(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 11.3' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       158,          7]
NotebookDataLength[    115208,       2317]
NotebookOptionsPosition[    105685,       2113]
NotebookOutlinePosition[    106358,       2139]
CellTagsIndexPosition[    106277,       2134]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[TextData[{
 "New in: ",
 Cell["1.2", "HistoryData",
  CellTags->"New",ExpressionUUID->"3580f52f-629a-4cf8-9098-7d57a6b494f3"],
 " | Modified in: ",
 Cell["2.0.1", "HistoryData",
  CellTags->"Modified",ExpressionUUID->"a2868a58-cc0c-4430-a9e3-ed865fa3a2e3"],
 " | Obsolete in: ",
 Cell[" ", "HistoryData",
  CellTags->"Obsolete",ExpressionUUID->"4defc8f2-1b0f-460a-bb04-afc8a67b45ea"],
 " | Excised in: ",
 Cell[" ", "HistoryData",
  CellTags->"Excised",ExpressionUUID->"b33d74f8-6bb8-4bd5-b2a7-d583edfb88f4"]
}], "History",
 CellChangeTimes->{{3.7649609058344603`*^9, 3.76496090598508*^9}, {
  3.767433568006606*^9, 3.767433568140274*^9}, {3.7800627302530727`*^9, 
  3.780062730253125*^9}, {3.7837976003079*^9, 3.783797601489112*^9}, {
  3.787405556174274*^9, 3.7874055561743298`*^9}},
 CellID->1247902091,ExpressionUUID->"50dc4a4f-4928-4b52-815b-6050e7a85ad7"],

Cell[CellGroupData[{

Cell["Categorization", "CategorizationSection",
 CellID->1122911449,ExpressionUUID->"d176bde3-ab33-447b-b7e2-c82de9e031b1"],

Cell["Symbol", "Categorization",
 CellLabel->"Entity Type",
 CellID->686433507,ExpressionUUID->"fc678601-a1d7-4f09-ac55-3b0e07f5fd9f"],

Cell["MaXrd", "Categorization",
 CellLabel->"Paclet Name",
 CellID->605800465,ExpressionUUID->"c1aed691-cdcd-4a68-8cf0-cd8ec05d5ed9"],

Cell["MaXrd`", "Categorization",
 CellLabel->"Context",
 CellID->468444828,ExpressionUUID->"13ed38d9-6e31-436d-b609-d48f58796d50"],

Cell["MaXrd/ref/ExportCrystalData", "Categorization",
 CellLabel->"URI",ExpressionUUID->"881c0d15-1319-4b52-a8ff-c5a7666ccee9"]
}, Closed]],

Cell[CellGroupData[{

Cell["Keywords", "KeywordsSection",
 CellID->477174294,ExpressionUUID->"edf8455b-660b-4a42-90de-bfd7380bc6df"],

Cell["XXXX", "Keywords",
 CellID->1164421360,ExpressionUUID->"c99f7077-7e8b-43e1-8b2c-41480358b580"]
}, Closed]],

Cell[CellGroupData[{

Cell["Syntax Templates", "TemplatesSection",
 CellID->1872225408,ExpressionUUID->"2099d69e-c294-47aa-85b7-4a5ccbb1e12d"],

Cell[BoxData[""], "Template",
 CellLabel->"Additional Function Template",
 CellID->1562036412,ExpressionUUID->"35c196d0-9160-4062-88a8-0dc128d8f761"],

Cell[BoxData[""], "Template",
 CellLabel->"Arguments Pattern",
 CellID->158391909,ExpressionUUID->"64c476db-8285-4698-84f2-64166a18665c"],

Cell[BoxData[""], "Template",
 CellLabel->"Local Variables",
 CellID->1360575930,ExpressionUUID->"611bf4cf-661b-4049-b506-5e6754d52fcd"],

Cell[BoxData[""], "Template",
 CellLabel->"Color Equal Signs",
 CellID->793782254,ExpressionUUID->"dc2f47ff-3a68-4247-a6c6-170874cf8988"]
}, Closed]],

Cell[CellGroupData[{

Cell["Details", "DetailsSection",
 CellID->307771771,ExpressionUUID->"66861830-f7ec-447d-90d7-b30eb2ce7395"],

Cell["XXXX", "Details",
 CellLabel->"Lead",
 CellID->670882175,ExpressionUUID->"f8dba1c7-482d-42af-9e10-9f2d1db53d33"],

Cell["XXXX", "Details",
 CellLabel->"Developers",
 CellID->350963985,ExpressionUUID->"cb48523d-0321-4e5e-bc89-b6878af850e9"],

Cell["XXXX", "Details",
 CellLabel->"Authors",
 CellID->8391405,ExpressionUUID->"11be61b0-8a4d-4e00-9878-fd59a7c6f86b"],

Cell["XXXX", "Details",
 CellLabel->"Feature Name",
 CellID->3610269,ExpressionUUID->"5e34a375-c882-4442-bd95-130c3ef93373"],

Cell["XXXX", "Details",
 CellLabel->"QA",
 CellID->401364205,ExpressionUUID->"3833a9b6-ee81-4e0a-a486-8ec3082d6a9b"],

Cell["XXXX", "Details",
 CellLabel->"DA",
 CellID->350204745,ExpressionUUID->"3b2ab7a3-b487-4e15-8978-65b9a4b173e4"],

Cell["XXXX", "Details",
 CellLabel->"Docs",
 CellID->732958810,ExpressionUUID->"69a7257a-4a43-4072-a217-b12ba0be971c"],

Cell["XXXX", "Details",
 CellLabel->"Features Page Notes",
 CellID->222905350,ExpressionUUID->"84f2ea48-9659-48ab-923b-5c56677b3221"],

Cell["XXXX", "Details",
 CellLabel->"Comments",
 CellID->240026365,ExpressionUUID->"ba079adf-2f26-4dfb-8c18-88308fd89493"]
}, Closed]],

Cell[CellGroupData[{

Cell["ExportCrystalData", "ObjectName",
 CellID->1224892054,ExpressionUUID->"0cb23b54-0928-46d7-9fb9-18b309dd83fc"],

Cell[TextData[{
 Cell["   ", "ModInfo",ExpressionUUID->"eb01a1d4-caaf-4102-9b8a-eafb566ff63d"],
 Cell[BoxData[
  RowBox[{
   ButtonBox["ExportCrystalData",
    BaseStyle->"Link",
    ButtonData->"paclet:MaXrd/ref/ExportCrystalData"], "[", 
   RowBox[{"\"\<DISCUS\>\"", ",", 
    StyleBox["crystal", "TI"], ",", 
    StyleBox["file", "TI"]}], "]"}]], "InlineFormula",ExpressionUUID->
  "14a73580-0499-4d7f-a5bf-3b16c2042bd0"],
 "\[LineSeparator]exports the data associated with ",
 Cell[BoxData[
  StyleBox["crystal", "TI"]], "InlineFormula",ExpressionUUID->
  "f0321dce-489e-4dec-8c3d-63a803ae62b3"],
 " to ",
 Cell[BoxData[
  StyleBox["file", "TI"]], "InlineFormula",ExpressionUUID->
  "9853ee70-2ba1-4339-895c-3ddc1297bbf1"],
 "; applicable for ",
 StyleBox["DISCUS",
  FontSlant->"Italic"],
 ".\n",
 Cell["      ", "ModInfo",ExpressionUUID->
  "2ba60042-b70e-4359-9c50-5fb29141a103"],
 Cell[BoxData[
  RowBox[{
   ButtonBox["ExportCrystalData",
    BaseStyle->"Link",
    ButtonData->"paclet:MaXrd/ref/ExportCrystalData"], "[", 
   RowBox[{"\"\<DIFFUSE\>\"", ",", 
    StyleBox["crystal", "TI"], ",", 
    StyleBox["dir", "TI"], ",", 
    StyleBox["hkl", "TI"], ",", 
    StyleBox["limit", "TI"], ",", 
    StyleBox["m", "TI"]}], "]"}]], "InlineFormula",ExpressionUUID->
  "a9e39be3-05af-44e2-a096-5649ef5328c3"],
 "\[LineSeparator]exports the data associated with ",
 Cell[BoxData[
  StyleBox["crystal", "TI"]], "InlineFormula",ExpressionUUID->
  "2ec25d8b-a6cb-40a6-9b09-dd208ee7dd21"],
 " (at ",
 Cell[BoxData[
  StyleBox["hkl", "TI"]], "InlineFormula",ExpressionUUID->
  "caea69b6-a75e-4b67-8f56-5176c95b1a3a"],
 " with reciprocal space ",
 Cell[BoxData[
  StyleBox["limit", "TI"]], "InlineFormula",ExpressionUUID->
  "a0ea547f-c118-4b19-9a4e-6384630490e8"],
 " using subtraction mode ",
 Cell[BoxData[
  StyleBox["m", "TI"]], "InlineFormula",ExpressionUUID->
  "55315821-b0fb-421d-a2ba-8847c6da2524"],
 ") to ",
 Cell[BoxData[
  StyleBox["dir", "TI"]], "InlineFormula",ExpressionUUID->
  "5e6ebf57-ef7b-47bc-8336-7d7579e13074"],
 "; applicable for ",
 StyleBox["DIFFUSE.",
  FontSlant->"Italic"]
}], "Usage",
 CellChangeTimes->{{3.7609611564660177`*^9, 3.760961216694683*^9}, {
  3.762769299091803*^9, 3.762769336056604*^9}, {3.783798600537084*^9, 
  3.7837986127184772`*^9}, {3.783798925401898*^9, 3.7837991147525263`*^9}, {
  3.783799234383769*^9, 3.783799252893094*^9}, {3.783799296524845*^9, 
  3.783799304036385*^9}, {3.783799411730535*^9, 3.783799495288172*^9}, {
  3.7838859687285557`*^9, 3.783886010850478*^9}},
 CellID->982511436,ExpressionUUID->"60991ac7-0c3e-44a1-b7f2-2a8ed4d32771"],

Cell["Options:", "Notes",
 CellChangeTimes->{{3.762622490625657*^9, 3.7626224930459633`*^9}},
 CellID->2086198239,ExpressionUUID->"995a2847-f6b9-4e5b-90a5-372beb526cb1"],

Cell[BoxData[GridBox[{
   {Cell["      ", "ModInfo",ExpressionUUID->
     "c473c003-80db-4df8-bb62-3f9763443830"], "\"\<Detailed\>\"", 
    ButtonBox["False",
     BaseStyle->"Link",
     ButtonData->"paclet:ref/False"], Cell[
    "output to a more detailed/verbose format", "TableText",ExpressionUUID->
     "4aa96243-e25f-4257-b8ad-93a7f90d857a"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "89b241e8-e67f-417f-97fd-b140fd154966"], 
    "\"\<IncludeStructureSizeInfo\>\"", 
    ButtonBox["True",
     BaseStyle->"Link",
     ButtonData->"paclet:ref/True"], Cell[TextData[{
     "whether to include ",
     StyleBox["ncell", "InlineCode"],
     " line in ",
     StyleBox["DISCUS",
      FontSlant->"Italic"],
     " file"
    }], "TableText",ExpressionUUID->"90fcdc38-0fb6-4ece-9086-46c53555329e"]}
  }]], "3ColumnTableMod",
 CellChangeTimes->{{3.783798576733273*^9, 3.783798576747945*^9}, {
  3.787405570237172*^9, 3.787405663789662*^9}},
 CellID->503559283,ExpressionUUID->"c80533c0-c5b2-4685-9a41-e3d0940c8ef0"],

Cell[TextData[{
 "The following scattering subtraction modes are available from ",
 StyleBox["DIFFUSE ",
  FontSlant->"Italic"],
 "(see ",
 StyleBox["ZMC_handbook_incomplete",
  FontSlant->"Italic"],
 ", pp. 68\[Dash]69 [2011-05-05]):"
}], "Notes",
 CellChangeTimes->{{3.783886040218402*^9, 3.783886065603401*^9}, {
  3.783886215384308*^9, 3.78388625216713*^9}, {3.7838863661741657`*^9, 
  3.783886372172407*^9}},
 CellID->1532908556,ExpressionUUID->"b3a07c44-823a-4f64-b8cb-ffb36b2a582a"],

Cell[BoxData[GridBox[{
   {Cell["      ", "ModInfo",ExpressionUUID->
     "35940d92-7f6d-445f-90b0-bc2dcfe3724c"], "None", "N", Cell[
    "no subtraction of Bragg peaks; no diffuse scattering", "TableText",
     ExpressionUUID->"939c7d4f-6949-467f-a793-0894ef6589e5"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "2eceeb89-155d-44b8-82e4-5caa8b066d5c"], "\"\<Biso\>\"", "Y", Cell[
    TextData[{
     "calculate Bragg scattering from ",
     Cell[BoxData[
      FormBox[
       SubscriptBox["B", 
        StyleBox["iso", "TR"]], TraditionalForm]], "InlineMath",
      ExpressionUUID->"9ab2dea3-71f2-47c1-9049-adf15e9ff53a"],
     " values"
    }], "TableText",ExpressionUUID->"7a3f7f35-2a46-468f-be60-34235b819721"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "16e71d4e-b874-4cd8-b020-1d65bad4ea8d"], "\"\<ExactAverage\>\"", "E", 
    Cell["subtract Bragg scattring from the whole crystal", "TableText",
     ExpressionUUID->"d41406a9-c9fd-48c4-a439-24c788af16f5"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "70f59e1b-b1d2-42c0-983c-9154d9dee282"], "\"\<SmallAverage\>\"", "e", 
    Cell["subtract Bragg scattering using 5% of the crystal", "TableText",
     ExpressionUUID->"adb57899-3ce1-4702-a5a7-0e42b5acc7bb"]}
  }]], "3ColumnTableMod",
 CellChangeTimes->{{3.783886098357024*^9, 3.783886118730072*^9}, {
  3.7838861509179153`*^9, 3.783886206954265*^9}, {3.783886282255042*^9, 
  3.783886350646984*^9}, {3.7838874923065968`*^9, 3.7838875128428373`*^9}, {
  3.7838875604671297`*^9, 3.783887572606709*^9}, {3.787603383334587*^9, 
  3.7876033936456013`*^9}},
 CellID->1937850278,ExpressionUUID->"00b46bb8-060e-47a9-87c0-2fe8805e0122"],

Cell[TextData[{
 Cell[BoxData[
  ButtonBox["Chop",
   BaseStyle->"Link",
   ButtonData->"ref/Chop"]], "InlineFormula",ExpressionUUID->
  "05338c67-9c7b-4109-9627-605165188288"],
 " is applied to all coordinates with a tolerance of ",
 Cell[BoxData[
  FormBox[
   SuperscriptBox["10", 
    RowBox[{"-", "6"}]], TraditionalForm]], "InlineMath",ExpressionUUID->
  "b763dbfd-7a1d-4f06-9588-1e9d4a50e393"],
 "."
}], "Notes",
 CellChangeTimes->{{3.7637970780544453`*^9, 3.763797134801086*^9}},
 CellID->991443164,ExpressionUUID->"c35bd49b-df7b-4abe-b3f9-d5e864779b0e"],

Cell[TextData[{
 "If no ADP values are present in ",
 Cell[BoxData[
  ButtonBox["$CrystalData",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/$CrystalData"]], "InlineFormula",
  ExpressionUUID->"3b95d0eb-30e8-4a47-b32b-8fd87dddd1ad"],
 ", a value of zero will be used in the export."
}], "Notes",
 CellChangeTimes->{{3.767433572463686*^9, 3.767433574307069*^9}, {
  3.7674336069053907`*^9, 3.767433655499153*^9}},
 CellID->12102587,ExpressionUUID->"490398c0-de59-4fd1-ae52-bfa340fe3ffd"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Tutorials", "TutorialsSection",
 CellID->250839057,ExpressionUUID->"a783bb20-ee87-42ee-aca9-bff8932ac1ed"],

Cell["XXXX", "Tutorials",
 CellID->341631938,ExpressionUUID->"725995f2-6a8e-4bf1-88d8-ecbc21ac3832"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Related Demonstrations", "RelatedDemonstrationsSection",
 CellID->1268215905,ExpressionUUID->"098cc794-f85e-4eaa-972b-0dfd43c2b154"],

Cell["XXXX", "RelatedDemonstrations",
 CellID->1129518860,ExpressionUUID->"9c7f86ab-ed20-406d-86ff-6bac47319ec5"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Related Links", "RelatedLinksSection",
 CellID->1584193535,ExpressionUUID->"e7a948f0-7476-47b5-ac29-11eb6a12741b"],

Cell[TextData[StyleBox[ButtonBox["GitHub page for DISCUS",
 BaseStyle->"Hyperlink",
 ButtonData->{
   URL["https://github.com/tproffen/DiffuseCode"], None}],
 FontSlant->"Italic"]], "RelatedLinks",
 CellChangeTimes->{{3.7612446057260447`*^9, 3.7612446324955473`*^9}},
 CellID->1038487239,ExpressionUUID->"da607a20-a54d-4cc1-bdcc-56b7c78f0ed2"]
}, Open  ]],

Cell[CellGroupData[{

Cell["See Also", "SeeAlsoSection",
 CellID->1255426704,ExpressionUUID->"1550f926-ac85-45b4-83db-59f233a94990"],

Cell[TextData[{
 Cell[BoxData[
  ButtonBox["$CrystalData",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/$CrystalData"]], "InlineFormula",
  ExpressionUUID->"c304677f-4e6d-4c46-b591-4bf871e3e246"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["ResetCrystalData",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/ResetCrystalData"]], "InlineFormula",
  ExpressionUUID->"f1138855-2750-412d-8fe9-27b4dcfd45c9"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["EquivalentIsotropicADP",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/EquivalentIsotropicADP"]], "InlineFormula",
  ExpressionUUID->"24f0c5a0-0230-409c-9348-9f734c81e53f"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["GetLatticeParameters",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/GetLatticeParameters"]], "InlineFormula",
  ExpressionUUID->"e962f335-493c-4fc2-8cca-46cc55dda596"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["GetCrystalMetric",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/GetCrystalMetric"]], "InlineFormula",
  ExpressionUUID->"f3ccba33-caea-4091-9b0d-217114a25197"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["SimulateDiffractionPattern",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/SimulateDiffractionPattern"]], 
  "InlineFormula",ExpressionUUID->"41b1b7a0-65d5-40dd-afc5-fd159553b01b"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["InputCheck",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/InputCheck"]], "InlineFormula",
  ExpressionUUID->"63e792e4-538e-4dc3-9312-bd50d1adf905"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["$GroupSymbolRedirect",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/$GroupSymbolRedirect"]], "InlineFormula",
  ExpressionUUID->"eace39c6-3ad1-47f5-8ce3-120dfef10148"]
}], "SeeAlso",
 CellChangeTimes->{{3.761244803920101*^9, 3.761244835069841*^9}, {
  3.7637972006794453`*^9, 3.763797204407302*^9}, {3.785057902751473*^9, 
  3.785057902751625*^9}, {3.787050925920065*^9, 3.7870509294304447`*^9}},
 CellID->929782353,ExpressionUUID->"3b0b554a-78bc-42da-a960-dba808805343"]
}, Open  ]],

Cell[CellGroupData[{

Cell["More About", "MoreAboutSection",
 CellID->38303248,ExpressionUUID->"feba3026-9a11-4ab6-8524-06d15e2564b1"],

Cell["XXXX", "MoreAbout",
 CellID->1665078683,ExpressionUUID->"9a200e81-69e3-4a62-bf89-b6024e667510"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[GridBox[{
    {
     StyleBox["Examples", "PrimaryExamplesSection"], 
     ButtonBox[
      RowBox[{
       RowBox[{"More", " ", "Examples"}], " ", "\[RightTriangle]"}],
      BaseStyle->"ExtendedExamplesLink",
      ButtonData:>"ExtendedExamples"]}
   }],
  $Line = 0; Null]], "PrimaryExamplesSection",
 CellID->880084151,ExpressionUUID->"2a5f58bb-3541-446a-9ce9-5ee26b6a05f8"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"tempFile", "=", 
   RowBox[{"FileNameJoin", "[", 
    RowBox[{"{", 
     RowBox[{"$TemporaryDirectory", ",", "\"\<test.stru\>\""}], "}"}], 
    "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ExportCrystalData", "[", 
   RowBox[{"\"\<DISCUS\>\"", ",", "\"\<Ice\>\"", ",", "tempFile"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{"Style", "[", 
  RowBox[{
   RowBox[{"Import", "@", "tempFile"}], ",", "11"}], "]"}]}], "Input",
 CellChangeTimes->{{3.76124465041428*^9, 3.761244678476749*^9}, {
   3.761244729809389*^9, 3.7612447339765472`*^9}, {3.762622679867538*^9, 
   3.762622773663638*^9}, 3.7797307562331543`*^9, {3.783799901328614*^9, 
   3.7837999077431793`*^9}},
 CellLabel->"In[1]:=",
 CellID->264836864,ExpressionUUID->"c2d86ab0-8bf6-40dc-94a2-ef0a972c0266"],

Cell[BoxData[
 StyleBox["\<\"title  Ice\\nspcgr  P63cm\\ncell   7.82  7.82  7.36  90.  90.  \
120.\\nncell  1,  1,  1,  5\\natoms\\nO          0.333300        0.000000     \
   0.062500       0.000000        \\nO          0.666700        0.000000      \
  0.937500       0.000000        \\nH          0.333300        0.000000       \
 0.174000       0.000000        \\nH          0.438000        0.000000        \
0.026000       0.000000        \\nH          0.772000        0.105000        \
0.975000       0.000000        \"\>",
  StripOnInput->False,
  FontSize->11]], "Output",
 CellChangeTimes->{{3.783799888907257*^9, 3.7837999340403347`*^9}, 
   3.784971190543798*^9},
 CellLabel->"Out[3]=",
 CellID->254198486,ExpressionUUID->"9da4655d-6c05-419b-8975-5ab973a4f0d4"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "06be3b61-ef8f-4aed-867b-1d20e79e0b8a"],
  $Line = 0; Null]], "ExampleDelimiter",
 CellID->464228894,ExpressionUUID->"533b0f72-61df-415b-9ef3-1b6f4575fb29"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"files", "=", 
  RowBox[{"ExportCrystalData", "[", 
   RowBox[{
   "\"\<DIFFUSE\>\"", ",", "\"\<Ice\>\"", ",", "\"\<~/Desktop\>\"", ",", 
    "\"\<hk0\>\"", ",", "5.5", ",", "\"\<N\>\""}], "]"}]}]], "Input",
 CellChangeTimes->{{3.7849712211189737`*^9, 3.784971257599671*^9}},
 CellLabel->"In[1]:=",
 CellID->1951865879,ExpressionUUID->"a19dcebc-1c52-426f-b729-c79184391b8a"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"\<\"~/Desktop/diffuse_input1_crystal.txt\"\>", 
   ",", "\<\"~/Desktop/diffuse_input2_setup.txt\"\>"}], "}"}]], "Output",
 CellChangeTimes->{{3.7849712465516157`*^9, 3.784971257817898*^9}, 
   3.7849713095062943`*^9},
 CellLabel->"Out[1]=",
 CellID->5454424,ExpressionUUID->"2fedf34c-5df2-4d00-bd28-f3b050f67c7e"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Style", "[", 
  RowBox[{
   RowBox[{"Import", "@", 
    RowBox[{"Last", "@", "files"}]}], ",", "8"}], "]"}]], "Input",
 CellChangeTimes->{{3.784971263513926*^9, 3.78497129379075*^9}},
 CellLabel->"In[2]:=",
 CellID->921750799,ExpressionUUID->"9ea991c1-89d5-461c-8897-55ef42004010"],

Cell[BoxData[
 StyleBox["\<\"Ice                                        \\t! Header or \
structure label\\n12645, 9676                                \\t! Random \
number seeds\\n7.82 7.82 7.36  0.00000 0.00000 -0.50000   \\t! Cell coord's; \
angles are cos(ang)\\n1 1 1                                      \\t! Size of \
crystal simulation (unit cells)\\nY                                          \
\\t! Periodic Boundary?\\n  11.0000,     4.0263,  0.                 \\t! \
Origin of volume\\n  11.0000,   -15.0263,  0.,  500           \\t! u-axis \
(bottom right) and image x-dimension\\n -11.0000,    15.0263,  0.,  500       \
    \\t! v-axis (top left) and image y-dimension\\n  11.0000,     4.0263,  \
0.,  1             \\t! w-axis (top right) and image z-dimension\\n3.0        \
                                \\t! sin(theta)/lambda maximum\\n1 1 1        \
                              \\t! Lot size\\n1                               \
           \\t! Number of lots\\n5                                          \
\\t! Number of atom sites per cell\\n2                                        \
  \\t! Number of different atom types (list of sc.coef's below)\\nN           \
                               \\t! Subtract average lattice? ('N', 'e', 'E' \
or 'Y')\\n'O'\\n3.0485,13.2771,2.2868,5.7011\\n1.5463,0.3239,0.867,32.9089,0.\
2508\\n0.0,0.0\\n'H'\\n0.493002,10.5109,0.322912,26.1257\\n0.140191,3.14236,0.\
04081,57.7997,0.003038\\n0.0,0.0\\n\"\>",
  StripOnInput->False,
  FontSize->8]], "Output",
 CellChangeTimes->{{3.784971274531143*^9, 3.784971310615143*^9}},
 CellLabel->"Out[2]=",
 CellID->1726379975,ExpressionUUID->"dd075130-54a4-4b1f-a57d-9615990c5e25"]
}, Open  ]]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["More Examples", "ExtendedExamplesSection",
 CellTags->"ExtendedExamples",
 CellID->1854448968,ExpressionUUID->"f4689d5b-0a23-4b40-b553-ab6eaf453b33"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Scope", "ExampleSection",ExpressionUUID->
   "04262b68-ad18-4dc0-9491-e71a515a5c48"],
  $Line = 0; Null]], "ExampleSection",
 CellID->1293636265,ExpressionUUID->"ff40a874-2b2d-4363-98e8-3415ba2bb5fd"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Generalizations & Extensions", "ExampleSection",ExpressionUUID->
   "b2fd2360-004f-4a67-ba9c-ceeb90354f46"],
  $Line = 0; Null]], "ExampleSection",
 CellID->1020263627,ExpressionUUID->"62a0c476-a513-4e9f-95f7-55256596555b"],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "Options", "ExampleSection",ExpressionUUID->
   "1096dfb6-ec61-4630-86c4-d103763d484e"],
  $Line = 0; Null]], "ExampleSection",
 CellID->2061341341,ExpressionUUID->"61bacb70-5179-4559-bab9-976f41e8c39b"],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\"Detailed\"", "ExampleSubsection",ExpressionUUID->
   "64668e1d-9157-492b-bd90-b9a5b76f7948"],
  $Line = 0; Null]], "ExampleSubsection",
 CellChangeTimes->{{3.7626227862587337`*^9, 3.762622789153515*^9}, {
  3.7856864840681*^9, 3.785686485260151*^9}},
 CellID->1757724783,ExpressionUUID->"8b24286f-2423-42cf-bdb3-7ec5f6fe9882"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"tempFile", "=", 
   RowBox[{"FileNameJoin", "[", 
    RowBox[{"{", 
     RowBox[{"$TemporaryDirectory", ",", "\"\<test.stru\>\""}], "}"}], 
    "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ExportCrystalData", "[", 
   RowBox[{"\"\<DISCUS\>\"", ",", "\"\<Ice\>\"", ",", "tempFile", ",", 
    RowBox[{"\"\<Detailed\>\"", "\[Rule]", "True"}]}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{"Style", "[", 
  RowBox[{
   RowBox[{"Import", "@", "tempFile"}], ",", "8"}], "]"}]}], "Input",
 CellChangeTimes->{{3.762622804160665*^9, 3.7626228289919443`*^9}, 
   3.779730778115115*^9, {3.783799972415938*^9, 3.783799984565666*^9}},
 CellLabel->"In[1]:=",
 CellID->409295607,ExpressionUUID->"0806bceb-770d-4865-9e75-aa559208be28"],

Cell[BoxData[
 StyleBox["\<\"title  Ice\\nspcgr  P63cm\\ncell   7.820000  7.820000  \
7.360000  90.000000  90.000000  120.000000\\nncell  1,  1,  1,  5\\natoms     \
 x,              y,              z,             Biso,    Property,  MoleNo,  \
MoleAt,   Occ\\nO          0.333300,       0.000000,       0.062500,      \
0.000000,        1,       0,       0,   1.000000\\nO          0.666700,       \
0.000000,       0.937500,      0.000000,        1,       0,       0,   \
1.000000\\nH          0.333300,       0.000000,       0.174000,      \
0.000000,        1,       0,       0,   1.000000\\nH          0.438000,       \
0.000000,       0.026000,      0.000000,        1,       0,       0,   \
1.000000\\nH          0.772000,       0.105000,       0.975000,      \
0.000000,        1,       0,       0,   1.000000\"\>",
  StripOnInput->False,
  FontSize->8]], "Output",
 CellChangeTimes->{{3.7626228097071247`*^9, 3.762622837341755*^9}, 
   3.764960838112502*^9, 3.7797308029253473`*^9, 3.7837999876864023`*^9, 
   3.7849711955862417`*^9},
 CellLabel->"Out[3]=",
 CellID->1418182021,ExpressionUUID->"d1b4d32e-4b8a-4630-bc8e-936ff22f3a1e"]
}, Open  ]]
}, Open  ]],

Cell[BoxData[
 InterpretationBox[Cell[
  "XXXX", "ExampleSubsection",ExpressionUUID->
   "aa520d04-ce39-4a59-ba90-9e8780cc6e95"],
  $Line = 0; Null]], "ExampleSubsection",
 CellID->1295379749,ExpressionUUID->"c66ad56d-2b62-4d04-aea6-fbe9a9165027"]
}, Open  ]],

Cell[BoxData[
 InterpretationBox[Cell[
  "Applications", "ExampleSection",ExpressionUUID->
   "76c98643-76dc-4b8a-a429-629eee4ad182"],
  $Line = 0; Null]], "ExampleSection",
 CellID->258228157,ExpressionUUID->"4b911d45-e5cc-4b06-9938-b0b81479e787"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Properties & Relations", "ExampleSection",ExpressionUUID->
   "4b82a7a8-dcbf-41c1-9d80-f19ef59811c5"],
  $Line = 0; Null]], "ExampleSection",
 CellID->2123667759,ExpressionUUID->"9e9b535c-8724-47d9-8591-086dc4ed09a1"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Possible Issues", "ExampleSection",ExpressionUUID->
   "7665bf75-67f7-4846-99c7-1f008156f75b"],
  $Line = 0; Null]], "ExampleSection",
 CellID->1305812373,ExpressionUUID->"b35ac030-5d47-48e8-9407-c8250af69641"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Interactive Examples", "ExampleSection",ExpressionUUID->
   "b0a7d26a-dc9f-4a33-8ab0-dcd281e56d15"],
  $Line = 0; Null]], "ExampleSection",
 CellID->1653164318,ExpressionUUID->"2c01ec3f-c12e-4a12-bcb7-5b6f12e749b1"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Neat Examples", "ExampleSection",ExpressionUUID->
   "0d86f446-84e7-417d-8327-305c7ccb688a"],
  $Line = 0; Null]], "ExampleSection",
 CellID->589267740,ExpressionUUID->"e5ef6032-f977-4f96-b142-1a31fafbc1bd"],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[TextData[{
   StyleBox["Mathematica",
    FontSlant->"Italic"],
   " code"
  }], "ExampleSection",ExpressionUUID->"7d52ddf8-9e40-46bf-b4f0-3bd4e0ab1042"],
  $Line = 0; Null]], "ExampleSection",
 CellChangeTimes->{{3.7614574259795513`*^9, 3.761457428561932*^9}},
 CellID->422887447,ExpressionUUID->"efc4cf49-9f02-4a51-8842-ae6eafeba104"],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"ExportCrystalData", "::", "InvalidProgramOrFormat"}], "=", 
   "\"\<\[LeftGuillemet]`1`\[RightGuillemet] is not a valid program/format.\>\
\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"ExportCrystalData", "::", "ParameterError"}], "=", 
   "\"\<Invalid input parameters.\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"ExportCrystalData", "::", "DirectoryExpected"}], "=", 
   "\"\<An existing output directory was expected.\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"ExportCrystalData", "::", "InvalidSubtractionMode"}], "=", 
    "\"\<\[LeftGuillemet]`1`\[RightGuillemet] is not a valid scattering \
subtraction mode.\>\""}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"Options", "@", "ExportCrystalData"}], "=", 
    RowBox[{"{", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"\"\<Detailed\>\"", "\[Rule]", "False"}], ",", 
      "\[IndentingNewLine]", 
      RowBox[{"\"\<IncludeStructureSizeInfo\>\"", "\[Rule]", "True"}]}], 
     "\[IndentingNewLine]", "}"}]}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"SyntaxInformation", "@", "ExportCrystalData"}], "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"\"\<ArgumentsPattern\>\"", "\[Rule]", 
     RowBox[{"{", 
      RowBox[{"_", ",", "_", ",", "_", ",", "_.", ",", "_.", ",", 
       RowBox[{"OptionsPattern", "[", "]"}]}], "}"}]}], "\[IndentingNewLine]",
     "}"}]}], ";"}]}], "Input",
 InitializationCell->False,
 CellChangeTimes->CompressedData["
1:eJwd0Fsow2EcxvFlsd0sxyVDkpu5YgehpF5bJCVJc9gFW9EcGhdqdjFyyJx3
I7LkVBYyFEN/EWWYw5IkcuGUKf/XqU0Ji/f3Xjx9bp6rb7y2vrAygMPhxJGB
hQJu0KydRQmf4TxwPt61dLzHInGKxQE6en68LMui6mw/dXPgTYiJmcKOSPAK
tSvUfhYZnkRK0CNvzgUFM53UttWR1IZAjF6vK9LAEs+NDSxQYurvOo8BGybt
1Gdm2wnuqLj7oN6c/k1/r8XUCyZL9cHD6FRzRsX6cxPY6M/uAqecoX2grLeO
KrWujYIRy/IxkJGeBH4Sh+IeqIM4xqhIJO7uUEPUZv9CEkZlc61/oG+4nL9I
NOWvUAWOR8MVceP8sgmsKseK6WSMon2hSlBWcVAM6rrNpaDvPscLZii01PS7
Ro6NaLEWBYD8L3MEKA7rp2JJiAvUNHe7QVHtxFGyhPRT57nBQ0nR7bgco9Fp
oQdUrr0/gysW1QsYxYiM96mkV3AsVbd1bQL1NWEt4D9grQLP
  "],
 CellLabel->"In[629]:=",
 CellID->1270824473,ExpressionUUID->"c6d97d09-e292-45d1-9c8c-4231ede77fa4"],

Cell[BoxData[
 RowBox[{
  RowBox[{"ExportCrystalData", "[", 
   RowBox[{
   "\"\<DISCUS\>\"", ",", "crystal_String", ",", "outputFile_String", ",", 
    RowBox[{"OptionsPattern", "[", "]"}]}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", "\[IndentingNewLine]", 
     RowBox[{
     "crystalData", ",", "atomData", ",", "size", ",", "unitCellAtomCount", 
      ",", "latticeParameters", ",", "\[IndentingNewLine]", "formatter", ",", 
      "appendComma", ",", "simpleQ", ",", "\[IndentingNewLine]", 
      "preambleTitle", ",", "preambleSpaceGroup", ",", "preambleCell", ",", 
      "preambleCount", ",", "preambleAtomsHeader", ",", "preamble", ",", 
      "\[IndentingNewLine]", "elements", ",", "coordinates", ",", "dispPars", 
      ",", "items", ",", "spacesToUse", ",", "additional", ",", "makeSpace", 
      ",", "atoms"}], "\[IndentingNewLine]", "}"}], ",", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"Loading", " ", "necessary", " ", "data"}], " ", "*)"}], 
    "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{
      RowBox[{"{", 
       RowBox[{
       "crystalData", ",", "atomData", ",", "size", ",", 
        "latticeParameters"}], "}"}], "=", 
      RowBox[{"ECD$LoadNecessaries", "@", "crystal"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"unitCellAtomCount", "=", 
      RowBox[{"Lookup", "[", 
       RowBox[{
        RowBox[{"crystalData", "[", "\"\<Notes\>\"", "]"}], ",", 
        "\[IndentingNewLine]", "\"\<UnitCellAtomsCount\>\"", ",", 
        RowBox[{"Round", "[", 
         RowBox[{
          RowBox[{"Length", "[", "atomData", "]"}], "/", 
          RowBox[{"Times", "@@", "size"}]}], "]"}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", "Auxiliary", " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"formatter", "[", "x_", "]"}], ":=", 
      RowBox[{"ToString", "@", 
       RowBox[{"NumberForm", "[", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"N", "@", 
          RowBox[{"Chop", "[", 
           RowBox[{"x", ",", 
            RowBox[{"Power", "[", 
             RowBox[{"10.", ",", 
              RowBox[{"-", "5"}]}], "]"}]}], "]"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"9", ",", "6"}], "}"}]}], "]"}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"appendComma", "[", "x_", "]"}], ":=", 
      RowBox[{"Map", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"StringInsert", "[", 
          RowBox[{"#", ",", "\"\<,\>\"", ",", 
           RowBox[{"-", "1"}]}], "]"}], "&"}], ",", "x", ",", 
        RowBox[{"{", "1", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"simpleQ", "=", 
      RowBox[{"!", 
       RowBox[{"TrueQ", "@", 
        RowBox[{"OptionValue", "[", "\"\<Detailed\>\"", "]"}]}]}]}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"latticeParameters", "=", 
      RowBox[{"If", "[", 
       RowBox[{"simpleQ", ",", "\[IndentingNewLine]", 
        RowBox[{"ToString", "/@", 
         RowBox[{"N", "@", "latticeParameters"}]}], ",", 
        "\[IndentingNewLine]", 
        RowBox[{"Map", "[", 
         RowBox[{"formatter", ",", "latticeParameters", ",", 
          RowBox[{"{", "1", "}"}]}], "]"}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Creating", " ", "the", " ", "preamble"}], " ", "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"preambleTitle", "=", 
      RowBox[{"{", 
       RowBox[{"\"\<title  \>\"", ",", "crystal"}], "}"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"preambleSpaceGroup", "=", 
      RowBox[{"{", 
       RowBox[{"\"\<spcgr  \>\"", ",", 
        RowBox[{"StringDelete", "[", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{
           RowBox[{"$GroupSymbolRedirect", "[", 
            RowBox[{"crystalData", "[", "\"\<SpaceGroup\>\"", "]"}], "]"}], 
           "\[IndentingNewLine]", "[", 
           RowBox[{"\"\<Name\>\"", ",", "\"\<HermannMauguinShort\>\""}], 
           "]"}], ",", "\"\< \>\""}], "]"}]}], "}"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"preambleCell", "=", 
      RowBox[{"{", 
       RowBox[{"\"\<cell   \>\"", ",", 
        RowBox[{"StringJoin", "@", 
         RowBox[{"Riffle", "[", 
          RowBox[{"latticeParameters", ",", "\"\<  \>\""}], "]"}]}]}], 
       "}"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"preambleCount", "=", 
      RowBox[{"{", 
       RowBox[{"\"\<ncell  \>\"", ",", 
        RowBox[{"StringJoin", "@", 
         RowBox[{"Riffle", "[", "\[IndentingNewLine]", 
          RowBox[{
           RowBox[{"ToString", "/@", 
            RowBox[{"Join", "[", 
             RowBox[{"size", ",", 
              RowBox[{"{", "unitCellAtomCount", "}"}]}], "]"}]}], ",", 
           "\[IndentingNewLine]", "\"\<,  \>\""}], "]"}]}]}], "}"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"preambleAtomsHeader", "=", 
      RowBox[{"If", "[", 
       RowBox[{"simpleQ", ",", "\[IndentingNewLine]", 
        RowBox[{"{", "\"\<atoms\\n\>\"", "}"}], ",", "\[IndentingNewLine]", 
        RowBox[{
        "{", "\"\<atoms      x,              y,              z,             \
Biso,    Property,  MoleNo,  MoleAt,   Occ\\n\>\"", "}"}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"preamble", "=", 
      RowBox[{"StringJoin", "@", 
       RowBox[{"Riffle", "[", 
        RowBox[{
         RowBox[{"{", "\[IndentingNewLine]", 
          RowBox[{
          "preambleTitle", ",", "preambleSpaceGroup", ",", "preambleCell", 
           ",", "\[IndentingNewLine]", 
           RowBox[{"If", "[", 
            RowBox[{
             RowBox[{"TrueQ", "@", 
              RowBox[{
              "OptionValue", "[", "\"\<IncludeStructureSizeInfo\>\"", "]"}]}],
              ",", "\[IndentingNewLine]", "preambleCount", ",", "Nothing"}], 
            "]"}], ",", "\[IndentingNewLine]", "preambleAtomsHeader"}], "}"}],
          ",", "\[IndentingNewLine]", 
         RowBox[{"{", "\"\<\\n\>\"", "}"}]}], "\[IndentingNewLine]", 
        "]"}]}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Extracting", " ", "atom", " ", "data"}], " ", "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"elements", "=", 
      RowBox[{"ToUpperCase", "@", 
       RowBox[{"Lookup", "[", 
        RowBox[{"atomData", ",", "\"\<Element\>\""}], "]"}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"elements", "=", 
      RowBox[{"StringDelete", "[", 
       RowBox[{"elements", ",", 
        RowBox[{"{", 
         RowBox[{"\"\<+\>\"", ",", "\"\<-\>\"", ",", "DigitCharacter"}], 
         "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"coordinates", "=", 
      RowBox[{"N", "@", 
       RowBox[{"Lookup", "[", 
        RowBox[{"atomData", ",", "\"\<FractionalCoordinates\>\""}], "]"}]}]}],
      ";", "\[IndentingNewLine]", 
     RowBox[{"coordinates", "=", 
      RowBox[{"Map", "[", 
       RowBox[{"formatter", ",", "coordinates", ",", 
        RowBox[{"{", "2", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", "simpleQ"}], ",", 
       RowBox[{"coordinates", "=", 
        RowBox[{"appendComma", "@", "coordinates"}]}]}], "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"dispPars", "=", 
      RowBox[{
       RowBox[{"EquivalentIsotropicADP", "[", "crystal", "]"}], "/.", 
       RowBox[{"_Missing", "\[Rule]", "0."}]}]}], ";", "\[IndentingNewLine]", 
     
     RowBox[{"dispPars", "=", 
      RowBox[{"formatter", "/@", "dispPars"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", "simpleQ"}], ",", 
       RowBox[{"dispPars", "=", 
        RowBox[{"appendComma", "@", "dispPars"}]}]}], "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"items", "=", 
      RowBox[{"{", 
       RowBox[{"elements", ",", 
        RowBox[{"Sequence", "@@", 
         RowBox[{"Transpose", "@", "coordinates"}]}], ",", "dispPars"}], 
       "}"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Determining", " ", "spacing", " ", "information"}], " ", 
      "*)"}], "\[IndentingNewLine]", 
     RowBox[{"spacesToUse", "=", 
      RowBox[{"Transpose", "@", 
       RowBox[{"ConstantArray", "[", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"11", ",", "16", ",", "16", ",", "15", ",", "8"}], "}"}], 
         ",", 
         RowBox[{"Length", "@", "atomData"}]}], "]"}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"additional", "=", "\"\<1,       0,       0,   1.000000\>\""}], 
     ";", "\[IndentingNewLine]", 
     RowBox[{"Do", "[", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{
        RowBox[{
        "spacesToUse", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}],
         "=", 
        RowBox[{
         RowBox[{
         "spacesToUse", "\[LeftDoubleBracket]", "i", 
          "\[RightDoubleBracket]"}], "-", 
         RowBox[{"(", 
          RowBox[{"StringLength", "/@", 
           RowBox[{
           "items", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], 
          ")"}]}]}], ",", "\[IndentingNewLine]", 
       RowBox[{"{", 
        RowBox[{"i", ",", 
         RowBox[{
          RowBox[{"Length", "@", "items"}], "-", "1"}]}], "}"}]}], "]"}], ";",
      "\[IndentingNewLine]", 
     RowBox[{"spacesToUse", "=", 
      RowBox[{"Transpose", "@", "spacesToUse"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"makeSpace", "[", 
       RowBox[{"i_", ",", "j_"}], "]"}], ":=", 
      RowBox[{"ConstantArray", "[", 
       RowBox[{"\"\< \>\"", ",", 
        RowBox[{"spacesToUse", "\[LeftDoubleBracket]", 
         RowBox[{"i", ",", "j"}], "\[RightDoubleBracket]"}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Writing", " ", "atom", " ", "data"}], " ", "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"atoms", "=", 
      RowBox[{
       RowBox[{"Reap", "[", 
        RowBox[{"Do", "[", 
         RowBox[{
          RowBox[{"Sow", "[", 
           RowBox[{"{", "\[IndentingNewLine]", 
            RowBox[{
             RowBox[{
             "elements", "\[LeftDoubleBracket]", "i", 
              "\[RightDoubleBracket]"}], ",", 
             RowBox[{"makeSpace", "[", 
              RowBox[{"i", ",", "1"}], "]"}], ",", "\[IndentingNewLine]", 
             RowBox[{"coordinates", "\[LeftDoubleBracket]", 
              RowBox[{"i", ",", "1"}], "\[RightDoubleBracket]"}], ",", 
             RowBox[{"makeSpace", "[", 
              RowBox[{"i", ",", "2"}], "]"}], ",", "\[IndentingNewLine]", 
             RowBox[{"coordinates", "\[LeftDoubleBracket]", 
              RowBox[{"i", ",", "2"}], "\[RightDoubleBracket]"}], ",", 
             RowBox[{"makeSpace", "[", 
              RowBox[{"i", ",", "3"}], "]"}], ",", "\[IndentingNewLine]", 
             RowBox[{"coordinates", "\[LeftDoubleBracket]", 
              RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}], ",", 
             RowBox[{"makeSpace", "[", 
              RowBox[{"i", ",", "4"}], "]"}], ",", "\[IndentingNewLine]", 
             RowBox[{
             "dispPars", "\[LeftDoubleBracket]", "i", 
              "\[RightDoubleBracket]"}], ",", 
             RowBox[{"makeSpace", "[", 
              RowBox[{"i", ",", "5"}], "]"}], ",", "\[IndentingNewLine]", 
             RowBox[{"If", "[", 
              RowBox[{"simpleQ", ",", "\"\<\>\"", ",", "additional"}], "]"}], 
             ",", "\[IndentingNewLine]", "\"\<\\n\>\""}], 
            "\[IndentingNewLine]", "}"}], "]"}], ",", 
          RowBox[{"{", 
           RowBox[{"i", ",", 
            RowBox[{"Length", "@", "atomData"}]}], "}"}]}], "]"}], "]"}], 
       "\[LeftDoubleBracket]", 
       RowBox[{"2", ",", "1"}], "\[RightDoubleBracket]"}]}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Prepare", " ", "output", " ", "and", " ", "export"}], " ", 
      "*)"}], "\[IndentingNewLine]", 
     RowBox[{"Export", "[", 
      RowBox[{"outputFile", ",", 
       RowBox[{"StringJoin", "[", 
        RowBox[{"preamble", ",", "atoms"}], "]"}], ",", "\"\<String\>\""}], 
      "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.682241896337058*^9, 3.6822419009563293`*^9}, {
   3.6822421030731297`*^9, 3.682242104796829*^9}, {3.682242247634622*^9, 
   3.682242293608499*^9}, {3.6822423242774973`*^9, 3.6822424939877663`*^9}, {
   3.682242524871819*^9, 3.682242610095582*^9}, {3.6822426631468697`*^9, 
   3.682242849688897*^9}, {3.682242985123843*^9, 3.682243000592795*^9}, {
   3.682243032221999*^9, 3.682243042906146*^9}, {3.682243121993319*^9, 
   3.682243187533738*^9}, {3.6822433171568623`*^9, 3.682243318068676*^9}, {
   3.6822433533711243`*^9, 3.68224345949043*^9}, {3.682243499999116*^9, 
   3.682243500570818*^9}, {3.682243559642397*^9, 3.682243568303032*^9}, {
   3.682243656585619*^9, 3.682243807041559*^9}, {3.682243892622666*^9, 
   3.682243979341007*^9}, {3.682244011749632*^9, 3.682244092729911*^9}, {
   3.6822441869470167`*^9, 3.682244221175058*^9}, {3.68224427065597*^9, 
   3.682244283409008*^9}, {3.6822443160128517`*^9, 3.682244326447394*^9}, {
   3.682244392020493*^9, 3.682244400571671*^9}, {3.682244596208706*^9, 
   3.682244803339835*^9}, {3.682244951115906*^9, 3.6822449654470167`*^9}, {
   3.682247256239483*^9, 3.682247304444981*^9}, {3.682247343926553*^9, 
   3.682247361035624*^9}, {3.682247395780785*^9, 3.6822474984407682`*^9}, {
   3.6822475305652437`*^9, 3.682247636381772*^9}, {3.6822476807262373`*^9, 
   3.682247690229601*^9}, {3.682247723533629*^9, 3.682247825538166*^9}, {
   3.682247866195016*^9, 3.6822478768890457`*^9}, {3.682247927112714*^9, 
   3.682248080675892*^9}, {3.682248357004342*^9, 3.682248375626561*^9}, {
   3.6822486441315317`*^9, 3.682248669634107*^9}, 3.68224956936229*^9, 
   3.682262332986014*^9, {3.6822623719028997`*^9, 3.68226237223594*^9}, {
   3.682312281830681*^9, 3.6823123030407467`*^9}, {3.682323578349629*^9, 
   3.682323592418137*^9}, {3.6823237158461313`*^9, 3.682323721213748*^9}, 
   3.682327662602072*^9, {3.6824963506791697`*^9, 3.6824963547512217`*^9}, {
   3.682496400113083*^9, 3.682496493228437*^9}, 3.682677149488262*^9, {
   3.685082142306231*^9, 3.6850821530756807`*^9}, 3.685084035768195*^9, {
   3.68655238046353*^9, 3.686552426771611*^9}, {3.6865525950866337`*^9, 
   3.686552685595372*^9}, {3.686635545814003*^9, 3.686635612323032*^9}, {
   3.686645933806924*^9, 3.686646007894505*^9}, {3.686646064248117*^9, 
   3.68664607682882*^9}, {3.686655195368894*^9, 3.6866552343027163`*^9}, {
   3.6866553151103287`*^9, 3.686655409251244*^9}, {3.6866554490764103`*^9, 
   3.686655514039054*^9}, {3.686655580018355*^9, 3.686655635546473*^9}, {
   3.686655748745368*^9, 3.686655776590246*^9}, {3.714925556554666*^9, 
   3.714925578583651*^9}, {3.7149256217212152`*^9, 3.714925689133297*^9}, {
   3.7149258652268667`*^9, 3.714925953487383*^9}, {3.71492600096751*^9, 
   3.714926119019596*^9}, {3.714926175338132*^9, 3.714926196305581*^9}, 
   3.7149262352489967`*^9, {3.714926307824396*^9, 3.7149264095004387`*^9}, {
   3.714926450015284*^9, 3.7149265295624437`*^9}, {3.7149265755610447`*^9, 
   3.714926579417263*^9}, {3.714926655695353*^9, 3.714926765295703*^9}, {
   3.714927064423978*^9, 3.714927159155733*^9}, {3.7149272069557753`*^9, 
   3.7149276407442627`*^9}, {3.714927818589819*^9, 3.714927894002508*^9}, {
   3.715014199691877*^9, 3.7150142148573313`*^9}, {3.715064942408142*^9, 
   3.715064943132308*^9}, {3.7153145414034758`*^9, 3.7153145467616673`*^9}, 
   3.715327856633502*^9, {3.7154051731829433`*^9, 3.7154051929183903`*^9}, {
   3.7154052332773438`*^9, 3.715405253294734*^9}, {3.715405360310897*^9, 
   3.7154054069587708`*^9}, {3.717222403726162*^9, 3.717222415552843*^9}, {
   3.717222474077138*^9, 3.717222480379856*^9}, {3.7172225774835167`*^9, 
   3.717222584585285*^9}, {3.717740920496456*^9, 3.71774092050616*^9}, {
   3.7220727239925957`*^9, 3.722072731381322*^9}, {3.722072809534255*^9, 
   3.722072832036512*^9}, {3.722072863802107*^9, 3.722072898519074*^9}, 
   3.726561391058339*^9, 3.727675293483314*^9, 3.727676783958682*^9, {
   3.728106031257224*^9, 3.7281060589380007`*^9}, {3.728106180011772*^9, 
   3.728106202173979*^9}, {3.728106287634863*^9, 3.728106301113369*^9}, {
   3.7281063321779118`*^9, 3.728106374799776*^9}, {3.7281065875793667`*^9, 
   3.728106596424721*^9}, {3.728106935268379*^9, 3.728106947051586*^9}, {
   3.728107085050242*^9, 3.728107225807564*^9}, {3.7281087296199503`*^9, 
   3.7281087417638607`*^9}, {3.728108952031921*^9, 3.728108953406122*^9}, 
   3.728109068830366*^9, {3.728109140732355*^9, 3.728109162684065*^9}, 
   3.7281092259390078`*^9, 3.737968467010312*^9, {3.7455680832964697`*^9, 
   3.745568119889543*^9}, {3.747569432494769*^9, 3.747569442874075*^9}, {
   3.74756949426586*^9, 3.747569500574552*^9}, {3.7475695377399282`*^9, 
   3.7475695465343924`*^9}, {3.7475699175021257`*^9, 3.747569978808453*^9}, {
   3.747570081604307*^9, 3.7475700987875013`*^9}, {3.747570851329288*^9, 
   3.747570860993803*^9}, {3.747570941533657*^9, 3.747570947293482*^9}, {
   3.747570979528742*^9, 3.747570979833435*^9}, {3.7475710460233097`*^9, 
   3.747571047925109*^9}, {3.747571084476077*^9, 3.747571086328722*^9}, {
   3.747571371903867*^9, 3.7475713729193487`*^9}, {3.747571561267179*^9, 
   3.747571562589777*^9}, {3.747572757880087*^9, 3.747572827753377*^9}, {
   3.747572862364382*^9, 3.747572879792859*^9}, {3.759519240146062*^9, 
   3.759519241328768*^9}, {3.760948481143589*^9, 3.760948499262701*^9}, {
   3.7609488207683067`*^9, 3.760948841778069*^9}, {3.760948882588552*^9, 
   3.760948883842764*^9}, {3.760948940717063*^9, 3.760948975282666*^9}, {
   3.760949011970159*^9, 3.760949012184416*^9}, 3.760949083736237*^9, {
   3.760949130238394*^9, 3.76094916161519*^9}, 3.760985557982565*^9, {
   3.7611975087352133`*^9, 3.76119751660457*^9}, {3.761474171084214*^9, 
   3.761474174768375*^9}, {3.761474414190099*^9, 3.761474436739811*^9}, {
   3.761474489155945*^9, 3.761474515473364*^9}, {3.761474549322021*^9, 
   3.761474603151936*^9}, {3.761474729429777*^9, 3.761474784036825*^9}, {
   3.761474849276947*^9, 3.7614748512846203`*^9}, 3.7614749412429934`*^9, {
   3.761475075055262*^9, 3.761475111589944*^9}, {3.761475177678194*^9, 
   3.761475208235873*^9}, {3.7614754099022007`*^9, 3.761475460275897*^9}, {
   3.7614755580354347`*^9, 3.7614755584485207`*^9}, {3.761475602255143*^9, 
   3.761475618458747*^9}, {3.761475728303033*^9, 3.7614757291959743`*^9}, {
   3.761475895540306*^9, 3.761475953150948*^9}, {3.7614759877525053`*^9, 
   3.7614760216772137`*^9}, {3.761476346852703*^9, 3.761476436475614*^9}, {
   3.761476501004677*^9, 3.7614765014024887`*^9}, {3.76147653684481*^9, 
   3.7614765625145817`*^9}, {3.7614766027780857`*^9, 3.761476696389943*^9}, {
   3.761476781958541*^9, 3.761476847138636*^9}, {3.761476879235957*^9, 
   3.761476898257463*^9}, {3.7614769388987217`*^9, 3.761476939672125*^9}, {
   3.7617280288811703`*^9, 3.7617280290289*^9}, {3.762062000358593*^9, 
   3.762062002890757*^9}, 3.7622515661086082`*^9, {3.762251817102137*^9, 
   3.762251929165433*^9}, {3.762252005452671*^9, 3.762252005611527*^9}, {
   3.762252046930657*^9, 3.7622520653518887`*^9}, {3.7622521337322073`*^9, 
   3.762252160781577*^9}, {3.762252243669989*^9, 3.762252252382333*^9}, {
   3.7622522870584927`*^9, 3.7622523110998173`*^9}, {3.7622525892905617`*^9, 
   3.762252653190784*^9}, {3.762252687617072*^9, 3.76225268868604*^9}, 
   3.762252720098925*^9, {3.7622602134972677`*^9, 3.762260245781844*^9}, {
   3.7622603606728363`*^9, 3.7622603955795927`*^9}, 3.762260809124468*^9, {
   3.762260920835347*^9, 3.7622609336590014`*^9}, {3.7622611020859957`*^9, 
   3.7622611022128*^9}, {3.762265433988163*^9, 3.762265647951427*^9}, {
   3.762265682974736*^9, 3.762265714676045*^9}, {3.7622657998190107`*^9, 
   3.762265823490719*^9}, {3.762266150777772*^9, 3.762266183714326*^9}, {
   3.762266297442079*^9, 3.762266404084507*^9}, {3.762266503346043*^9, 
   3.7622665058192873`*^9}, {3.762266581522806*^9, 3.762266603588318*^9}, {
   3.762266694495263*^9, 3.762266728238165*^9}, {3.762266789430751*^9, 
   3.76226681293922*^9}, {3.7622668497813883`*^9, 3.762266850066354*^9}, {
   3.762267098742383*^9, 3.762267102028309*^9}, {3.762267643315309*^9, 
   3.7622677082670116`*^9}, {3.762267743017583*^9, 3.762267788543005*^9}, {
   3.7622678343978357`*^9, 3.762267872315877*^9}, {3.762267908117887*^9, 
   3.762267928051405*^9}, 3.762267973773315*^9, {3.762268017780451*^9, 
   3.7622680575155687`*^9}, 3.762793093215591*^9, {3.763796995475988*^9, 
   3.7637970043599586`*^9}, {3.7643154838421183`*^9, 3.764315495506998*^9}, {
   3.764945527167924*^9, 3.764945538174453*^9}, {3.767432814398486*^9, 
   3.767432819483389*^9}, {3.7674328754926987`*^9, 3.767432894311245*^9}, {
   3.7674334785881023`*^9, 3.76743347876075*^9}, {3.783069231678774*^9, 
   3.783069266967184*^9}, 3.7830693020753717`*^9, 3.7830876846213007`*^9, {
   3.783601557168208*^9, 3.78360156744668*^9}, {3.7836022865660763`*^9, 
   3.783602306060294*^9}, {3.783602507800161*^9, 3.783602521215067*^9}, {
   3.7836025595507593`*^9, 3.783602559800055*^9}, {3.783604816433077*^9, 
   3.783604819534629*^9}, {3.783749852081997*^9, 3.7837498583161583`*^9}, {
   3.783839612368231*^9, 3.783839619375147*^9}, {3.7838397408860607`*^9, 
   3.783839742547872*^9}, 3.7838399432332*^9, {3.78383997716043*^9, 
   3.783839994134857*^9}, {3.783840038479353*^9, 3.783840055934451*^9}, {
   3.7856866354927807`*^9, 3.785686661125942*^9}, {3.787396175011367*^9, 
   3.787396179069569*^9}, {3.787396223402565*^9, 3.7873962849858294`*^9}, {
   3.787397043019964*^9, 3.7873970855250607`*^9}, {3.7873971691273746`*^9, 
   3.787397172890153*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[636]:=",
 CellID->2022048296,ExpressionUUID->"dc94ec92-e1c1-4468-9d3e-8d7ecd224421"],

Cell[BoxData[
 RowBox[{
  RowBox[{"ExportCrystalData", "[", 
   RowBox[{
   "\"\<DIFFUSE\>\"", ",", "crystal_String", ",", "outputDir_String", ",", 
    "hklPlane_", ",", "indexLimit_", ",", "subtractionMode_String", ",", 
    RowBox[{"OptionsPattern", "[", "]"}]}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", "\[IndentingNewLine]", 
     RowBox[{
     "reorganise", ",", "source", ",", "scatteringFactorTemplate", ",", 
      "\[IndentingNewLine]", "crystalData", ",", "atomData", ",", 
      "allElements", ",", "size", ",", "latticeParameters", ",", 
      "directionCosines", ",", "M", ",", "\[IndentingNewLine]", "partA", ",", 
      "X", ",", "Y", ",", "Z", ",", "unitCells", ",", "MakeSitesTable", ",", 
      "table", ",", "sitesList", ",", "\[IndentingNewLine]", "partB", ",", 
      "maxPossibleSites", ",", "newAtomData", ",", "blockLengths", ",", 
      "\[IndentingNewLine]", "headerComments", ",", "headerData", ",", 
      "padWidth", ",", "header", ",", "scatteringData"}], 
     "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", 
    "\[IndentingNewLine]", 
    RowBox[{"(*", " ", "Checks", " ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"InputCheck", "[", 
      RowBox[{"\"\<CrystalQ\>\"", ",", "crystal"}], "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"DirectoryQ", "@", "outputDir"}]}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{"ExportCrystalData", "::", "DirectoryExpected"}], "]"}], ";", 
        RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"MemberQ", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
           "\"\<N\>\"", ",", "\"\<Y\>\"", ",", "\"\<E\>\"", ",", 
            "\"\<e\>\""}], "}"}], ",", "subtractionMode"}], "]"}]}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{
          RowBox[{"ExportCrystalData", "::", "InvalidSubtractionMode"}], ",", 
          "subtractionMode"}], "]"}], ";", 
        RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", " ", "Auxiliary", " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"reorganise", "[", "data_Association", "]"}], ":=", 
      RowBox[{"With", "[", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"xyz", "=", 
          RowBox[{"data", "[", "\"\<FractionalCoordinates\>\"", "]"}]}], 
         "}"}], ",", "\[IndentingNewLine]", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"Min", "/@", 
           RowBox[{"Transpose", "[", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{
               RowBox[{"IntegerPart", "@", "xyz"}], "+", "1"}], ",", "size"}],
              "}"}], "]"}]}], ",", "\[IndentingNewLine]", 
          RowBox[{"StringJoin", "[", "\[IndentingNewLine]", 
           RowBox[{"\"\<   \>\"", ",", "\[IndentingNewLine]", 
            RowBox[{"StringPadRight", "[", 
             RowBox[{
              RowBox[{
               RowBox[{
                RowBox[{"ToString", "@", 
                 RowBox[{"DecimalForm", "[", 
                  RowBox[{"#", ",", 
                   RowBox[{"{", 
                    RowBox[{"11", ",", "5"}], "}"}]}], "]"}]}], "&"}], "/@", 
               RowBox[{"FractionalPart", "@", "xyz"}]}], ",", "11"}], "]"}], 
            ",", "\[IndentingNewLine]", 
            RowBox[{"StringDelete", "[", 
             RowBox[{
              RowBox[{"data", "[", "\"\<Element\>\"", "]"}], ",", 
              RowBox[{"{", 
               RowBox[{"DigitCharacter", ",", "\"\<+\>\"", ",", "\"\<-\>\""}],
                "}"}]}], "]"}]}], "\[IndentingNewLine]", "]"}]}], "}"}]}], 
       "\[IndentingNewLine]", "]"}]}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"MakeSitesTable", "[", "stop_Integer", "]"}], ":=", 
      RowBox[{"(", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"table", "=", 
         RowBox[{"Table", "[", 
          RowBox[{
           RowBox[{"{", 
            RowBox[{"i", ",", 
             RowBox[{"If", "[", 
              RowBox[{
               RowBox[{"i", ">", "stop"}], ",", "0", ",", "i"}], "]"}]}], 
            "}"}], ",", 
           RowBox[{"{", 
            RowBox[{"i", ",", "maxPossibleSites"}], "}"}]}], "]"}]}], ";", 
        "\[IndentingNewLine]", 
        RowBox[{"table", "=", 
         RowBox[{"Map", "[", 
          RowBox[{"ToString", ",", "table", ",", 
           RowBox[{"{", "2", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", 
        RowBox[{"table", "=", 
         RowBox[{
          RowBox[{
           RowBox[{"StringPadLeft", "[", 
            RowBox[{"#", ",", "6"}], "]"}], "&"}], "/@", "table"}]}], ";", 
        "\[IndentingNewLine]", 
        RowBox[{"StringJoin", "/@", "table"}]}], "\[IndentingNewLine]", 
       ")"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"source", "=", 
      RowBox[{"Import", "@", 
       RowBox[{"FileNameJoin", "[", "\[IndentingNewLine]", 
        RowBox[{"{", 
         RowBox[{
         "$MaXrdPath", ",", "\"\<Core\>\"", ",", "\"\<Data\>\"", ",", 
          "\"\<AtomicScatteringFactor\>\"", ",", 
          "\"\<InternationalTablesC(3rd).m\>\""}], "}"}], "]"}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"scatteringFactorTemplate", "[", "element_", "]"}], ":=", 
      RowBox[{
       RowBox[{
       "StringTemplate", "[", 
        "\"\<'`X`'\n`a1`,`b1`,`a2`,`b2`\n`a3`,`b3`,`a4`,`b4`,`c`\n\
0.0,0.0\>\"", "]"}], "@", 
       RowBox[{"Join", "[", 
        RowBox[{
         RowBox[{"source", "[", "element", "]"}], ",", 
         RowBox[{"<|", 
          RowBox[{"\"\<X\>\"", "\[Rule]", "element"}], "|>"}]}], "]"}]}]}], 
     ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Loading", " ", "necessary", " ", "data"}], " ", "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{
       "crystalData", ",", "atomData", ",", "size", ",", 
        "latticeParameters"}], "}"}], "=", 
      RowBox[{"ECD$LoadNecessaries", "@", "crystal"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"allElements", "=", 
      RowBox[{"DeleteDuplicates", "@", 
       RowBox[{"atomData", "\[LeftDoubleBracket]", 
        RowBox[{"All", ",", "\"\<Element\>\""}], 
        "\[RightDoubleBracket]"}]}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"allElements", "=", 
      RowBox[{"DeleteDuplicates", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"StringDelete", "[", 
          RowBox[{"#", ",", "\[IndentingNewLine]", 
           RowBox[{"{", 
            RowBox[{"DigitCharacter", ",", "\"\<+\>\"", ",", "\"\<-\>\""}], 
            "}"}]}], "]"}], "&"}], "/@", "allElements"}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"directionCosines", "=", 
      RowBox[{
       RowBox[{
        RowBox[{"ToString", "@", 
         RowBox[{"DecimalForm", "[", "\[IndentingNewLine]", 
          RowBox[{
           RowBox[{"Cos", "[", 
            RowBox[{"#", "*", "Degree"}], "]"}], ",", 
           RowBox[{"{", 
            RowBox[{"6", ",", "5"}], "}"}]}], "]"}]}], "&"}], "/@", 
       RowBox[{"N", "@", 
        RowBox[{"latticeParameters", "\[LeftDoubleBracket]", 
         RowBox[{"4", ";;", "6"}], "\[RightDoubleBracket]"}]}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"M", "=", 
      RowBox[{"GetCrystalMetric", "[", 
       RowBox[{"crystal", ",", 
        RowBox[{"\"\<ToCartesian\>\"", "\[Rule]", "True"}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{
       RowBox[{"File", " ", "1"}], ":", " ", 
       RowBox[{"Crystal", " ", "data", " ", 
        RowBox[{"in", " ", "'"}], 
        RowBox[{"DIFFUSE", "'"}], " ", "format"}]}], " ", "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Part", " ", "B"}], " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"newAtomData", "=", 
      RowBox[{"reorganise", "/@", "atomData"}]}], ";", "\[IndentingNewLine]", 
     
     RowBox[{"newAtomData", "=", 
      RowBox[{"DeleteDuplicates", "/@", 
       RowBox[{"GatherBy", "[", 
        RowBox[{"newAtomData", ",", 
         RowBox[{
          RowBox[{"#", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}],
           "&"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"blockLengths", "=", 
      RowBox[{"Length", "/@", "newAtomData"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"maxPossibleSites", "=", 
      RowBox[{"Max", "@", "blockLengths"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"partB", "=", 
      RowBox[{"Flatten", "@", 
       RowBox[{"Riffle", "[", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{
          RowBox[{"StringTemplate", "[", "\"\< `1` `2` `3`\>\"", "]"}], "@@@", 
          RowBox[{"newAtomData", "\[LeftDoubleBracket]", 
           RowBox[{"All", ",", "1", ",", "1"}], "\[RightDoubleBracket]"}]}], 
         ",", "\[IndentingNewLine]", 
         RowBox[{"newAtomData", "\[LeftDoubleBracket]", 
          RowBox[{"All", ",", "All", ",", "2"}], "\[RightDoubleBracket]"}]}], 
        "\[IndentingNewLine]", "]"}]}]}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Part", " ", "A"}], " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"sitesList", "=", 
      RowBox[{"MakeSitesTable", "/@", "blockLengths"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"X", ",", "Y", ",", "Z"}], "}"}], "=", "size"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"unitCells", "=", 
      RowBox[{"Flatten", "[", 
       RowBox[{
        RowBox[{"Table", "[", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{
           RowBox[{"StringTemplate", "[", "\"\< `1` `2` `3`\>\"", "]"}], "[", 
           
           RowBox[{"x", ",", "y", ",", "z"}], "]"}], ",", 
          "\[IndentingNewLine]", 
          RowBox[{"{", 
           RowBox[{"x", ",", "1", ",", "X"}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{"y", ",", "1", ",", "Y"}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{"z", ",", "1", ",", "Z"}], "}"}]}], "]"}], ",", "2"}], 
       "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"partA", "=", 
      RowBox[{"Flatten", "@", 
       RowBox[{"Transpose", "[", 
        RowBox[{"{", 
         RowBox[{"unitCells", ",", "sitesList"}], "}"}], "]"}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"PrependTo", "[", 
      RowBox[{"partA", ",", 
       RowBox[{
        RowBox[{
        "StringTemplate", "[", "\"\< `X` `Y` `Z` `N1` `N1`\>\"", "]"}], "@", 
        RowBox[{"<|", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"\"\<X\>\"", "\[Rule]", "X"}], ",", 
          RowBox[{"\"\<Y\>\"", "\[Rule]", "Y"}], ",", 
          RowBox[{"\"\<Z\>\"", "\[Rule]", "Z"}], ",", 
          RowBox[{"\"\<N1\>\"", "\[Rule]", "maxPossibleSites"}]}], "|>"}]}]}],
       "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{
       RowBox[{"File", " ", "2"}], ":", " ", 
       RowBox[{
        RowBox[{"Input", "/", "summary"}], " ", "file"}]}], " ", "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"headerComments", "=", 
      RowBox[{"{", "\[IndentingNewLine]", 
       RowBox[{
       "\"\<Header or structure label\>\"", ",", "\[IndentingNewLine]", 
        "\"\<Random number seeds\>\"", ",", "\[IndentingNewLine]", 
        "\"\<Cell coord's; angles are cos(ang)\>\"", ",", 
        "\[IndentingNewLine]", 
        "\"\<Size of crystal simulation (unit cells)\>\"", ",", 
        "\[IndentingNewLine]", "\"\<Periodic Boundary?\>\"", ",", 
        "\[IndentingNewLine]", "\"\<Origin of volume\>\"", ",", 
        "\[IndentingNewLine]", 
        "\"\<u-axis (bottom right) and image x-dimension\>\"", ",", 
        "\[IndentingNewLine]", 
        "\"\<v-axis (top left) and image y-dimension\>\"", ",", 
        "\[IndentingNewLine]", 
        "\"\<w-axis (top right) and image z-dimension\>\"", ",", 
        "\[IndentingNewLine]", "\"\<sin(theta)/lambda maximum\>\"", ",", 
        "\[IndentingNewLine]", "\"\<Lot size\>\"", ",", 
        "\[IndentingNewLine]", "\"\<Number of lots\>\"", ",", 
        "\[IndentingNewLine]", "\"\<Number of atom sites per cell\>\"", ",", 
        "\[IndentingNewLine]", 
        "\"\<Number of different atom types (list of sc.coef's below)\>\"", 
        ",", "\[IndentingNewLine]", 
        "\"\<Subtract average lattice? ('N', 'e', 'E' or 'Y')\>\""}], 
       "\[IndentingNewLine]", "}"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"headerData", "=", 
      RowBox[{"{", "\[IndentingNewLine]", 
       RowBox[{
       "crystal", ",", "\[IndentingNewLine]", "\"\<12645, 9676\>\"", ",", 
        "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{
         "StringTemplate", "[", "\"\<`1` `2` `3`  `4` `5` `6`\>\"", "]"}], "@@", 
         RowBox[{"Join", "[", 
          RowBox[{
           RowBox[{"latticeParameters", "\[LeftDoubleBracket]", 
            RowBox[{"1", ";;", "3"}], "\[RightDoubleBracket]"}], ",", 
           "directionCosines"}], "]"}]}], ",", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"StringTemplate", "[", "\"\<`1` `2` `3`\>\"", "]"}], "@@", 
         "size"}], ",", "\[IndentingNewLine]", "\"\<Y\>\"", ",", 
        "\[IndentingNewLine]", 
        RowBox[{"Sequence", "@@", 
         RowBox[{"InputCheck", "[", 
          RowBox[{
          "\"\<GetReciprocalImageOrientation\>\"", ",", "\[IndentingNewLine]",
            "crystal", ",", "hklPlane", ",", "indexLimit", ",", "True"}], 
          "]"}]}], ",", "\[IndentingNewLine]", "\"\<3.0\>\"", ",", 
        "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"StringTemplate", "[", "\"\<`1` `2` `3`\>\"", "]"}], "@@", 
         "size"}], ",", "\[IndentingNewLine]", "\"\<1\>\"", ",", 
        "\[IndentingNewLine]", 
        RowBox[{"ToString", "@", "maxPossibleSites"}], ",", 
        "\[IndentingNewLine]", 
        RowBox[{"ToString", "@", 
         RowBox[{"Length", "@", "allElements"}]}], ",", "\[IndentingNewLine]",
         "subtractionMode"}], "\[IndentingNewLine]", "}"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"padWidth", "=", 
      RowBox[{
       RowBox[{"Max", "[", 
        RowBox[{"StringLength", "/@", "headerData"}], "]"}], "+", "3"}]}], 
     ";", "\[IndentingNewLine]", 
     RowBox[{"headerData", "=", 
      RowBox[{"StringPadRight", "[", 
       RowBox[{"headerData", ",", "padWidth"}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"header", "=", 
      RowBox[{"Transpose", "@", 
       RowBox[{"{", 
        RowBox[{"headerData", ",", 
         RowBox[{
          RowBox[{
           RowBox[{"\"\<! \>\"", "<>", "#"}], "&"}], "/@", 
          "headerComments"}]}], "}"}]}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"scatteringData", "=", 
      RowBox[{"scatteringFactorTemplate", "/@", "allElements"}]}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Prepare", " ", "output", " ", "and", " ", "export"}], " ", 
      "*)"}], "\[IndentingNewLine]", 
     RowBox[{"{", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"Export", "[", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"FileNameJoin", "[", 
          RowBox[{"{", 
           RowBox[{"outputDir", ",", "\"\<diffuse_input1_crystal.txt\>\""}], 
           "}"}], "]"}], ",", "\[IndentingNewLine]", 
         RowBox[{"Join", "[", 
          RowBox[{"partA", ",", "partB", ",", 
           RowBox[{"{", "\"\<\\n\>\"", "}"}]}], "]"}], ",", 
         "\[IndentingNewLine]", "\"\<Table\>\""}], "]"}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{"Export", "[", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"FileNameJoin", "[", 
          RowBox[{"{", 
           RowBox[{"outputDir", ",", "\"\<diffuse_input2_setup.txt\>\""}], 
           "}"}], "]"}], ",", "\[IndentingNewLine]", 
         RowBox[{"Join", "[", 
          RowBox[{"header", ",", "scatteringData", ",", 
           RowBox[{"{", "\"\<\\n\>\"", "}"}]}], "]"}], ",", 
         "\[IndentingNewLine]", "\"\<Table\>\""}], "]"}]}], 
      "\[IndentingNewLine]", "}"}]}]}], "\[IndentingNewLine]", 
   "]"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.682241896337058*^9, 3.6822419009563293`*^9}, {
   3.6822421030731297`*^9, 3.682242104796829*^9}, {3.682242247634622*^9, 
   3.682242293608499*^9}, {3.6822423242774973`*^9, 3.6822424939877663`*^9}, {
   3.682242524871819*^9, 3.682242610095582*^9}, {3.6822426631468697`*^9, 
   3.682242849688897*^9}, {3.682242985123843*^9, 3.682243000592795*^9}, {
   3.682243032221999*^9, 3.682243042906146*^9}, {3.682243121993319*^9, 
   3.682243187533738*^9}, {3.6822433171568623`*^9, 3.682243318068676*^9}, {
   3.6822433533711243`*^9, 3.68224345949043*^9}, {3.682243499999116*^9, 
   3.682243500570818*^9}, {3.682243559642397*^9, 3.682243568303032*^9}, {
   3.682243656585619*^9, 3.682243807041559*^9}, {3.682243892622666*^9, 
   3.682243979341007*^9}, {3.682244011749632*^9, 3.682244092729911*^9}, {
   3.6822441869470167`*^9, 3.682244221175058*^9}, {3.68224427065597*^9, 
   3.682244283409008*^9}, {3.6822443160128517`*^9, 3.682244326447394*^9}, {
   3.682244392020493*^9, 3.682244400571671*^9}, {3.682244596208706*^9, 
   3.682244803339835*^9}, {3.682244951115906*^9, 3.6822449654470167`*^9}, {
   3.682247256239483*^9, 3.682247304444981*^9}, {3.682247343926553*^9, 
   3.682247361035624*^9}, {3.682247395780785*^9, 3.6822474984407682`*^9}, {
   3.6822475305652437`*^9, 3.682247636381772*^9}, {3.6822476807262373`*^9, 
   3.682247690229601*^9}, {3.682247723533629*^9, 3.682247825538166*^9}, {
   3.682247866195016*^9, 3.6822478768890457`*^9}, {3.682247927112714*^9, 
   3.682248080675892*^9}, {3.682248357004342*^9, 3.682248375626561*^9}, {
   3.6822486441315317`*^9, 3.682248669634107*^9}, 3.68224956936229*^9, 
   3.682262332986014*^9, {3.6822623719028997`*^9, 3.68226237223594*^9}, {
   3.682312281830681*^9, 3.6823123030407467`*^9}, {3.682323578349629*^9, 
   3.682323592418137*^9}, {3.6823237158461313`*^9, 3.682323721213748*^9}, 
   3.682327662602072*^9, {3.6824963506791697`*^9, 3.6824963547512217`*^9}, {
   3.682496400113083*^9, 3.682496493228437*^9}, 3.682677149488262*^9, {
   3.685082142306231*^9, 3.6850821530756807`*^9}, 3.685084035768195*^9, {
   3.68655238046353*^9, 3.686552426771611*^9}, {3.6865525950866337`*^9, 
   3.686552685595372*^9}, {3.686635545814003*^9, 3.686635612323032*^9}, {
   3.686645933806924*^9, 3.686646007894505*^9}, {3.686646064248117*^9, 
   3.68664607682882*^9}, {3.686655195368894*^9, 3.6866552343027163`*^9}, {
   3.6866553151103287`*^9, 3.686655409251244*^9}, {3.6866554490764103`*^9, 
   3.686655514039054*^9}, {3.686655580018355*^9, 3.686655635546473*^9}, {
   3.686655748745368*^9, 3.686655776590246*^9}, {3.714925556554666*^9, 
   3.714925578583651*^9}, {3.7149256217212152`*^9, 3.714925689133297*^9}, {
   3.7149258652268667`*^9, 3.714925953487383*^9}, {3.71492600096751*^9, 
   3.714926119019596*^9}, {3.714926175338132*^9, 3.714926196305581*^9}, 
   3.7149262352489967`*^9, {3.714926307824396*^9, 3.7149264095004387`*^9}, {
   3.714926450015284*^9, 3.7149265295624437`*^9}, {3.7149265755610447`*^9, 
   3.714926579417263*^9}, {3.714926655695353*^9, 3.714926765295703*^9}, {
   3.714927064423978*^9, 3.714927159155733*^9}, {3.7149272069557753`*^9, 
   3.7149276407442627`*^9}, {3.714927818589819*^9, 3.714927894002508*^9}, {
   3.715014199691877*^9, 3.7150142148573313`*^9}, {3.715064942408142*^9, 
   3.715064943132308*^9}, {3.7153145414034758`*^9, 3.7153145467616673`*^9}, 
   3.715327856633502*^9, {3.7154051731829433`*^9, 3.7154051929183903`*^9}, {
   3.7154052332773438`*^9, 3.715405253294734*^9}, {3.715405360310897*^9, 
   3.7154054069587708`*^9}, {3.717222403726162*^9, 3.717222415552843*^9}, {
   3.717222474077138*^9, 3.717222480379856*^9}, {3.7172225774835167`*^9, 
   3.717222584585285*^9}, {3.717740920496456*^9, 3.71774092050616*^9}, {
   3.7220727239925957`*^9, 3.722072731381322*^9}, {3.722072809534255*^9, 
   3.722072832036512*^9}, {3.722072863802107*^9, 3.722072898519074*^9}, 
   3.726561391058339*^9, 3.727675293483314*^9, 3.727676783958682*^9, {
   3.728106031257224*^9, 3.7281060589380007`*^9}, {3.728106180011772*^9, 
   3.728106202173979*^9}, {3.728106287634863*^9, 3.728106301113369*^9}, {
   3.7281063321779118`*^9, 3.728106374799776*^9}, {3.7281065875793667`*^9, 
   3.728106596424721*^9}, {3.728106935268379*^9, 3.728106947051586*^9}, {
   3.728107085050242*^9, 3.728107225807564*^9}, {3.7281087296199503`*^9, 
   3.7281087417638607`*^9}, {3.728108952031921*^9, 3.728108953406122*^9}, 
   3.728109068830366*^9, {3.728109140732355*^9, 3.728109162684065*^9}, 
   3.7281092259390078`*^9, 3.737968467010312*^9, {3.7455680832964697`*^9, 
   3.745568119889543*^9}, {3.747569432494769*^9, 3.747569442874075*^9}, {
   3.74756949426586*^9, 3.747569500574552*^9}, {3.7475695377399282`*^9, 
   3.7475695465343924`*^9}, {3.7475699175021257`*^9, 3.747569978808453*^9}, {
   3.747570081604307*^9, 3.7475700987875013`*^9}, {3.747570851329288*^9, 
   3.747570860993803*^9}, {3.747570941533657*^9, 3.747570947293482*^9}, {
   3.747570979528742*^9, 3.747570979833435*^9}, {3.7475710460233097`*^9, 
   3.747571047925109*^9}, {3.747571084476077*^9, 3.747571086328722*^9}, {
   3.747571371903867*^9, 3.7475713729193487`*^9}, {3.747571561267179*^9, 
   3.747571562589777*^9}, {3.747572757880087*^9, 3.747572827753377*^9}, {
   3.747572862364382*^9, 3.747572879792859*^9}, {3.759519240146062*^9, 
   3.759519241328768*^9}, {3.760948481143589*^9, 3.760948499262701*^9}, {
   3.7609488207683067`*^9, 3.760948841778069*^9}, {3.760948882588552*^9, 
   3.760948883842764*^9}, {3.760948940717063*^9, 3.760948975282666*^9}, {
   3.760949011970159*^9, 3.760949012184416*^9}, 3.760949083736237*^9, {
   3.760949130238394*^9, 3.76094916161519*^9}, 3.760985557982565*^9, {
   3.7611975087352133`*^9, 3.76119751660457*^9}, {3.761474171084214*^9, 
   3.761474174768375*^9}, {3.761474414190099*^9, 3.761474436739811*^9}, {
   3.761474489155945*^9, 3.761474515473364*^9}, {3.761474549322021*^9, 
   3.761474603151936*^9}, {3.761474729429777*^9, 3.761474784036825*^9}, {
   3.761474849276947*^9, 3.7614748512846203`*^9}, 3.7614749412429934`*^9, {
   3.761475075055262*^9, 3.761475111589944*^9}, {3.761475177678194*^9, 
   3.761475208235873*^9}, {3.7614754099022007`*^9, 3.761475460275897*^9}, {
   3.7614755580354347`*^9, 3.7614755584485207`*^9}, {3.761475602255143*^9, 
   3.761475618458747*^9}, {3.761475728303033*^9, 3.7614757291959743`*^9}, {
   3.761475895540306*^9, 3.761475953150948*^9}, {3.7614759877525053`*^9, 
   3.7614760216772137`*^9}, {3.761476346852703*^9, 3.761476436475614*^9}, {
   3.761476501004677*^9, 3.7614765014024887`*^9}, {3.76147653684481*^9, 
   3.7614765625145817`*^9}, {3.7614766027780857`*^9, 3.761476696389943*^9}, {
   3.761476781958541*^9, 3.761476847138636*^9}, {3.761476879235957*^9, 
   3.761476898257463*^9}, {3.7614769388987217`*^9, 3.761476939672125*^9}, {
   3.7617280288811703`*^9, 3.7617280290289*^9}, {3.762062000358593*^9, 
   3.762062002890757*^9}, 3.7622515661086082`*^9, {3.762251817102137*^9, 
   3.762251929165433*^9}, {3.762252005452671*^9, 3.762252005611527*^9}, {
   3.762252046930657*^9, 3.7622520653518887`*^9}, {3.7622521337322073`*^9, 
   3.762252160781577*^9}, {3.762252243669989*^9, 3.762252252382333*^9}, {
   3.7622522870584927`*^9, 3.7622523110998173`*^9}, {3.7622525892905617`*^9, 
   3.762252653190784*^9}, {3.762252687617072*^9, 3.76225268868604*^9}, 
   3.762252720098925*^9, {3.7622602134972677`*^9, 3.762260245781844*^9}, {
   3.7622603606728363`*^9, 3.7622603955795927`*^9}, 3.762260809124468*^9, {
   3.762260920835347*^9, 3.7622609336590014`*^9}, {3.7622611020859957`*^9, 
   3.7622611022128*^9}, {3.762265433988163*^9, 3.762265647951427*^9}, {
   3.762265682974736*^9, 3.762265714676045*^9}, {3.7622657998190107`*^9, 
   3.762265823490719*^9}, {3.762266150777772*^9, 3.762266183714326*^9}, {
   3.762266297442079*^9, 3.762266404084507*^9}, {3.762266503346043*^9, 
   3.7622665058192873`*^9}, {3.762266581522806*^9, 3.762266603588318*^9}, {
   3.762266694495263*^9, 3.762266728238165*^9}, {3.762266789430751*^9, 
   3.76226681293922*^9}, {3.7622668497813883`*^9, 3.762266850066354*^9}, {
   3.762267098742383*^9, 3.762267102028309*^9}, {3.762267643315309*^9, 
   3.7622677082670116`*^9}, {3.762267743017583*^9, 3.762267788543005*^9}, {
   3.7622678343978357`*^9, 3.762267872315877*^9}, {3.762267908117887*^9, 
   3.762267928051405*^9}, 3.762267973773315*^9, {3.762268017780451*^9, 
   3.7622680575155687`*^9}, 3.762793093215591*^9, {3.763796995475988*^9, 
   3.7637970043599586`*^9}, {3.7643154838421183`*^9, 3.764315495506998*^9}, {
   3.764945527167924*^9, 3.764945538174453*^9}, {3.767432814398486*^9, 
   3.767432819483389*^9}, {3.7674328754926987`*^9, 3.767432894311245*^9}, {
   3.7674334785881023`*^9, 3.76743347876075*^9}, {3.783069231678774*^9, 
   3.783069266967184*^9}, 3.7830693020753717`*^9, {3.783087670253394*^9, 
   3.783087692517221*^9}, {3.783087735097041*^9, 3.7830880407310047`*^9}, {
   3.7830896557036057`*^9, 3.783089655981719*^9}, {3.7830960653733*^9, 
   3.783096097330763*^9}, {3.783096177529833*^9, 3.783096217488394*^9}, 
   3.783096403572884*^9, {3.783096499380589*^9, 3.783096678487729*^9}, {
   3.7830967101189957`*^9, 3.7830967683185453`*^9}, {3.783096810245809*^9, 
   3.7830969314424973`*^9}, {3.783157041710597*^9, 3.783157071451893*^9}, 
   3.783158293531158*^9, {3.783158345329475*^9, 3.7831584119283037`*^9}, {
   3.783162888798779*^9, 3.7831629160834846`*^9}, {3.783173913377779*^9, 
   3.783173927301927*^9}, {3.78317468233254*^9, 3.783174731586187*^9}, {
   3.783181333932486*^9, 3.783181355705113*^9}, 3.783182265822321*^9, {
   3.783182316941475*^9, 3.783182383458167*^9}, {3.783182554647244*^9, 
   3.7831825600059423`*^9}, {3.783182822376739*^9, 3.783182853542233*^9}, {
   3.783182889878277*^9, 3.783182934134598*^9}, {3.783182995421097*^9, 
   3.783183036649972*^9}, {3.783183069050721*^9, 3.783183191030245*^9}, {
   3.783183232775155*^9, 3.783183237420909*^9}, {3.78318339958671*^9, 
   3.7831834296081047`*^9}, {3.783183827440568*^9, 3.783183870661778*^9}, {
   3.7831858146833487`*^9, 3.783185820360832*^9}, {3.78318620357759*^9, 
   3.7831863955464983`*^9}, {3.7831864488989487`*^9, 3.783186585983418*^9}, {
   3.783186670150992*^9, 3.783186732816155*^9}, {3.783186772100696*^9, 
   3.7831867922121983`*^9}, {3.783186878850333*^9, 3.783186879920302*^9}, {
   3.7831870216135387`*^9, 3.783187032301166*^9}, {3.783187090181974*^9, 
   3.783187119805009*^9}, {3.783187195209736*^9, 3.783187211600642*^9}, {
   3.783187389227145*^9, 3.7831873956208487`*^9}, {3.7831874423488693`*^9, 
   3.7831874482836246`*^9}, {3.783187498147171*^9, 3.783187519594695*^9}, 
   3.783187549691279*^9, {3.7831875806594877`*^9, 3.7831875942107162`*^9}, 
   3.783187641746428*^9, {3.783187675529022*^9, 3.783187719981183*^9}, {
   3.78318775777507*^9, 3.783187777507882*^9}, {3.783195034318838*^9, 
   3.783195082369486*^9}, {3.783195129176243*^9, 3.783195130654354*^9}, 
   3.783195600430035*^9, {3.783195875568955*^9, 3.783195923116975*^9}, 
   3.7832404866326427`*^9, 3.783240537982945*^9, {3.783241766563958*^9, 
   3.783241770169858*^9}, {3.783242019589055*^9, 3.783242038913435*^9}, {
   3.783242224440885*^9, 3.783242232079968*^9}, {3.783242363414337*^9, 
   3.7832424064301023`*^9}, {3.783242440565166*^9, 3.7832424648026743`*^9}, {
   3.7832425068205843`*^9, 3.7832425069775333`*^9}, {3.7832428495568666`*^9, 
   3.7832428525702267`*^9}, {3.7833542866937017`*^9, 3.783354309444758*^9}, {
   3.783355614593163*^9, 3.783355640838348*^9}, {3.78335833421679*^9, 
   3.783358334758829*^9}, {3.783359693620332*^9, 3.783359721627674*^9}, {
   3.783361653056139*^9, 3.7833616572554417`*^9}, 3.783362194124464*^9, 
   3.78336223465842*^9, {3.783362393368207*^9, 3.78336245282276*^9}, {
   3.7833631602478237`*^9, 3.78336317317529*^9}, {3.783363636844595*^9, 
   3.783363674874811*^9}, {3.7834053675756693`*^9, 3.7834053792610207`*^9}, {
   3.78340583132686*^9, 3.783405831388301*^9}, {3.7834059187574177`*^9, 
   3.783405920434761*^9}, {3.783406753268241*^9, 3.783406758700287*^9}, {
   3.783408564127472*^9, 3.783408564196937*^9}, {3.783409214047086*^9, 
   3.783409220333387*^9}, {3.7834092529907017`*^9, 3.783409266756735*^9}, {
   3.783409308918028*^9, 3.783409328267762*^9}, {3.7834093770844517`*^9, 
   3.783409380945528*^9}, {3.783409474178068*^9, 3.783409480351221*^9}, {
   3.783409516417066*^9, 3.783409528518855*^9}, {3.7834095696870127`*^9, 
   3.783409575533265*^9}, {3.78341403995479*^9, 3.783414061688508*^9}, {
   3.783414179951048*^9, 3.783414199261772*^9}, {3.783415241625046*^9, 
   3.783415258198558*^9}, {3.783415294945393*^9, 3.783415333013176*^9}, {
   3.7834154590669413`*^9, 3.783415468578064*^9}, {3.7834155039130774`*^9, 
   3.783415527368451*^9}, {3.783418581398685*^9, 3.783418664800386*^9}, {
   3.783418723713091*^9, 3.7834187328069143`*^9}, {3.783419129079568*^9, 
   3.783419161050747*^9}, {3.783419483639987*^9, 3.783419490022593*^9}, 
   3.783419546414909*^9, {3.783419624037633*^9, 3.783419629859383*^9}, {
   3.783419691492093*^9, 3.78341970060884*^9}, {3.7834197798175917`*^9, 
   3.783419786526613*^9}, {3.7834198795754337`*^9, 3.783419888324492*^9}, {
   3.783419978237026*^9, 3.783419988274308*^9}, {3.783420066460009*^9, 
   3.783420075168106*^9}, {3.783420141537942*^9, 3.783420151366643*^9}, {
   3.783420438571474*^9, 3.783420446959621*^9}, {3.7834206705259237`*^9, 
   3.7834206829308367`*^9}, {3.7834207424382133`*^9, 3.783420750859206*^9}, {
   3.783421365767969*^9, 3.783421373597426*^9}, {3.783421965333004*^9, 
   3.783422006585594*^9}, {3.783422059923292*^9, 3.783422066422491*^9}, {
   3.783422880213716*^9, 3.783422887304878*^9}, {3.783423017795732*^9, 
   3.783423131788115*^9}, {3.783423170557499*^9, 3.7834231864683104`*^9}, {
   3.783423235235924*^9, 3.783423243065174*^9}, {3.7834232813629103`*^9, 
   3.78342328419268*^9}, {3.783423332465522*^9, 3.783423360958775*^9}, {
   3.7834235748693542`*^9, 3.783423585625668*^9}, {3.783423829774604*^9, 
   3.783423906795795*^9}, {3.7835949976169567`*^9, 3.783595000387117*^9}, {
   3.7835964592279263`*^9, 3.783596465811654*^9}, {3.783600610945345*^9, 
   3.7836006122709923`*^9}, {3.783600797137312*^9, 3.783600797760571*^9}, {
   3.7836009041833963`*^9, 3.7836009135655317`*^9}, {3.7836015781115103`*^9, 
   3.783601584526657*^9}, {3.783602323461935*^9, 3.783602331901326*^9}, {
   3.783602567824038*^9, 3.783602568007573*^9}, {3.7836026056154127`*^9, 
   3.783602606878813*^9}, {3.7836026943742332`*^9, 3.7836027045402813`*^9}, 
   3.783603676744483*^9, {3.7836048280155373`*^9, 3.7836048306712303`*^9}, {
   3.7836120126686773`*^9, 3.783612058163261*^9}, {3.7836294962427387`*^9, 
   3.7836294971450243`*^9}, {3.78367855699205*^9, 3.7836785579939947`*^9}, {
   3.783751914143035*^9, 3.783751917364276*^9}, {3.783752456130177*^9, 
   3.7837524597846203`*^9}, {3.783753178273793*^9, 3.783753232024022*^9}, {
   3.783761366904949*^9, 3.7837614049966393`*^9}, {3.783762226638749*^9, 
   3.7837622471563997`*^9}, 3.783762278390437*^9, {3.783762607811885*^9, 
   3.783762642173745*^9}, {3.7837627210564404`*^9, 3.783762723836267*^9}, {
   3.7837627643079977`*^9, 3.7837627663538103`*^9}, {3.78376300089753*^9, 
   3.783763029750209*^9}, 3.7837631167895403`*^9, {3.783766768067577*^9, 
   3.7837668049512367`*^9}, {3.78376695714963*^9, 3.783767014492795*^9}, {
   3.783767086923337*^9, 3.783767089664115*^9}, {3.783767156740288*^9, 
   3.783767218452998*^9}, 3.7837672577199917`*^9, 3.78376737697598*^9, {
   3.7837674952646513`*^9, 3.783767633994014*^9}, {3.7837676961523323`*^9, 
   3.783767700096168*^9}, {3.783768354186084*^9, 3.78376836807111*^9}, {
   3.7837685061291428`*^9, 3.7837685383131104`*^9}, {3.783768583505228*^9, 
   3.783768592440967*^9}, {3.783768656671399*^9, 3.783768659730729*^9}, {
   3.783769004845414*^9, 3.783769041874454*^9}, {3.783769082066485*^9, 
   3.7837691263582697`*^9}, {3.7837691578773613`*^9, 3.783769194706942*^9}, {
   3.783769244773*^9, 3.7837693116340923`*^9}, {3.783769378120384*^9, 
   3.7837693975069513`*^9}, {3.7837694287139883`*^9, 3.7837694316590853`*^9}, 
   3.783769462289791*^9, {3.783769511026675*^9, 3.7837695164456472`*^9}, {
   3.783769552251379*^9, 3.783769586155624*^9}, {3.783786861387738*^9, 
   3.783786871321435*^9}, {3.783787197957829*^9, 3.783787223225919*^9}, {
   3.7837872601933928`*^9, 3.7837872608809643`*^9}, {3.783787299674459*^9, 
   3.783787300224313*^9}, {3.783788877735794*^9, 3.7837888819900703`*^9}, {
   3.783789037918386*^9, 3.7837890457150793`*^9}, 3.7837891814017687`*^9, {
   3.783789836378255*^9, 3.783789846952216*^9}, {3.783790172246834*^9, 
   3.7837901876340103`*^9}, {3.783839057600107*^9, 3.783839063365744*^9}, {
   3.783839110887517*^9, 3.783839128574362*^9}, {3.783840111454967*^9, 
   3.783840145989664*^9}, {3.7838402114228907`*^9, 3.7838402115883293`*^9}, {
   3.783856824593422*^9, 3.783856824936243*^9}, {3.783885890028225*^9, 
   3.783885899531683*^9}, {3.78388639965694*^9, 3.783886424847077*^9}, {
   3.78388646471933*^9, 3.783886500022209*^9}, {3.783887115446066*^9, 
   3.7838871162491217`*^9}, {3.7869680323113327`*^9, 3.786968033813298*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[637]:=",
 CellID->636997097,ExpressionUUID->"1bb5ba4c-a1a6-4fb5-b768-57a59cf75fec"],

Cell[BoxData[
 RowBox[{
  RowBox[{"ECD$LoadNecessaries", "[", "crystal_String", "]"}], ":=", 
  RowBox[{"Block", "[", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "crystalData", ",", "atomData", ",", "crystalNotes", ",", "size", ",", 
      "latticeParameters"}], "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"InputCheck", "[", 
      RowBox[{"\"\<CrystalQ\>\"", ",", "crystal"}], "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"crystalData", "=", 
      RowBox[{"$CrystalData", "[", "crystal", "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"atomData", "=", 
      RowBox[{"N", "@", 
       RowBox[{"crystalData", "[", "\"\<AtomData\>\"", "]"}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"crystalNotes", "=", 
      RowBox[{"Lookup", "[", 
       RowBox[{"crystalData", ",", "\"\<Notes\>\"", ",", 
        RowBox[{"<|", "|>"}]}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"AssociationQ", "@", "crystalNotes"}]}], ",", 
       RowBox[{"crystalNotes", "=", 
        RowBox[{"<|", "|>"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     RowBox[{"size", "=", 
      RowBox[{
       RowBox[{"Lookup", "[", 
        RowBox[{
        "crystalNotes", ",", "\"\<StructureSize\>\"", ",", 
         "\[IndentingNewLine]", 
         RowBox[{"Round", "/@", 
          RowBox[{"Max", "/@", 
           RowBox[{"Transpose", "@", 
            RowBox[{"atomData", "\[LeftDoubleBracket]", 
             RowBox[{"All", ",", "\"\<FractionalCoordinates\>\""}], 
             "\[RightDoubleBracket]"}]}]}]}]}], "\[IndentingNewLine]", "]"}], 
       "/.", 
       RowBox[{"{", 
        RowBox[{"0", "\[Rule]", "1"}], "}"}]}]}], ";", "\[IndentingNewLine]", 
     
     RowBox[{"latticeParameters", "=", 
      RowBox[{"GetLatticeParameters", "[", 
       RowBox[{"crystal", ",", 
        RowBox[{"\"\<Units\>\"", "\[Rule]", "False"}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "crystalData", ",", "atomData", ",", "size", ",", "latticeParameters"}],
       "}"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.682241896337058*^9, 3.6822419009563293`*^9}, {
   3.6822421030731297`*^9, 3.682242104796829*^9}, {3.682242247634622*^9, 
   3.682242293608499*^9}, {3.6822423242774973`*^9, 3.6822424939877663`*^9}, {
   3.682242524871819*^9, 3.682242610095582*^9}, {3.6822426631468697`*^9, 
   3.682242849688897*^9}, {3.682242985123843*^9, 3.682243000592795*^9}, {
   3.682243032221999*^9, 3.682243042906146*^9}, {3.682243121993319*^9, 
   3.682243187533738*^9}, {3.6822433171568623`*^9, 3.682243318068676*^9}, {
   3.6822433533711243`*^9, 3.68224345949043*^9}, {3.682243499999116*^9, 
   3.682243500570818*^9}, {3.682243559642397*^9, 3.682243568303032*^9}, {
   3.682243656585619*^9, 3.682243807041559*^9}, {3.682243892622666*^9, 
   3.682243979341007*^9}, {3.682244011749632*^9, 3.682244092729911*^9}, {
   3.6822441869470167`*^9, 3.682244221175058*^9}, {3.68224427065597*^9, 
   3.682244283409008*^9}, {3.6822443160128517`*^9, 3.682244326447394*^9}, {
   3.682244392020493*^9, 3.682244400571671*^9}, {3.682244596208706*^9, 
   3.682244803339835*^9}, {3.682244951115906*^9, 3.6822449654470167`*^9}, {
   3.682247256239483*^9, 3.682247304444981*^9}, {3.682247343926553*^9, 
   3.682247361035624*^9}, {3.682247395780785*^9, 3.6822474984407682`*^9}, {
   3.6822475305652437`*^9, 3.682247636381772*^9}, {3.6822476807262373`*^9, 
   3.682247690229601*^9}, {3.682247723533629*^9, 3.682247825538166*^9}, {
   3.682247866195016*^9, 3.6822478768890457`*^9}, {3.682247927112714*^9, 
   3.682248080675892*^9}, {3.682248357004342*^9, 3.682248375626561*^9}, {
   3.6822486441315317`*^9, 3.682248669634107*^9}, 3.68224956936229*^9, 
   3.682262332986014*^9, {3.6822623719028997`*^9, 3.68226237223594*^9}, {
   3.682312281830681*^9, 3.6823123030407467`*^9}, {3.682323578349629*^9, 
   3.682323592418137*^9}, {3.6823237158461313`*^9, 3.682323721213748*^9}, 
   3.682327662602072*^9, {3.6824963506791697`*^9, 3.6824963547512217`*^9}, {
   3.682496400113083*^9, 3.682496493228437*^9}, 3.682677149488262*^9, {
   3.685082142306231*^9, 3.6850821530756807`*^9}, 3.685084035768195*^9, {
   3.68655238046353*^9, 3.686552426771611*^9}, {3.6865525950866337`*^9, 
   3.686552685595372*^9}, {3.686635545814003*^9, 3.686635612323032*^9}, {
   3.686645933806924*^9, 3.686646007894505*^9}, {3.686646064248117*^9, 
   3.68664607682882*^9}, {3.686655195368894*^9, 3.6866552343027163`*^9}, {
   3.6866553151103287`*^9, 3.686655409251244*^9}, {3.6866554490764103`*^9, 
   3.686655514039054*^9}, {3.686655580018355*^9, 3.686655635546473*^9}, {
   3.686655748745368*^9, 3.686655776590246*^9}, {3.714925556554666*^9, 
   3.714925578583651*^9}, {3.7149256217212152`*^9, 3.714925689133297*^9}, {
   3.7149258652268667`*^9, 3.714925953487383*^9}, {3.71492600096751*^9, 
   3.714926119019596*^9}, {3.714926175338132*^9, 3.714926196305581*^9}, 
   3.7149262352489967`*^9, {3.714926307824396*^9, 3.7149264095004387`*^9}, {
   3.714926450015284*^9, 3.7149265295624437`*^9}, {3.7149265755610447`*^9, 
   3.714926579417263*^9}, {3.714926655695353*^9, 3.714926765295703*^9}, {
   3.714927064423978*^9, 3.714927159155733*^9}, {3.7149272069557753`*^9, 
   3.7149276407442627`*^9}, {3.714927818589819*^9, 3.714927894002508*^9}, {
   3.715014199691877*^9, 3.7150142148573313`*^9}, {3.715064942408142*^9, 
   3.715064943132308*^9}, {3.7153145414034758`*^9, 3.7153145467616673`*^9}, 
   3.715327856633502*^9, {3.7154051731829433`*^9, 3.7154051929183903`*^9}, {
   3.7154052332773438`*^9, 3.715405253294734*^9}, {3.715405360310897*^9, 
   3.7154054069587708`*^9}, {3.717222403726162*^9, 3.717222415552843*^9}, {
   3.717222474077138*^9, 3.717222480379856*^9}, {3.7172225774835167`*^9, 
   3.717222584585285*^9}, {3.717740920496456*^9, 3.71774092050616*^9}, {
   3.7220727239925957`*^9, 3.722072731381322*^9}, {3.722072809534255*^9, 
   3.722072832036512*^9}, {3.722072863802107*^9, 3.722072898519074*^9}, 
   3.726561391058339*^9, 3.727675293483314*^9, 3.727676783958682*^9, {
   3.728106031257224*^9, 3.7281060589380007`*^9}, {3.728106180011772*^9, 
   3.728106202173979*^9}, {3.728106287634863*^9, 3.728106301113369*^9}, {
   3.7281063321779118`*^9, 3.728106374799776*^9}, {3.7281065875793667`*^9, 
   3.728106596424721*^9}, {3.728106935268379*^9, 3.728106947051586*^9}, {
   3.728107085050242*^9, 3.728107225807564*^9}, {3.7281087296199503`*^9, 
   3.7281087417638607`*^9}, {3.728108952031921*^9, 3.728108953406122*^9}, 
   3.728109068830366*^9, {3.728109140732355*^9, 3.728109162684065*^9}, 
   3.7281092259390078`*^9, 3.737968467010312*^9, {3.7455680832964697`*^9, 
   3.745568119889543*^9}, {3.747569432494769*^9, 3.747569442874075*^9}, {
   3.74756949426586*^9, 3.747569500574552*^9}, {3.7475695377399282`*^9, 
   3.7475695465343924`*^9}, {3.7475699175021257`*^9, 3.747569978808453*^9}, {
   3.747570081604307*^9, 3.7475700987875013`*^9}, {3.747570851329288*^9, 
   3.747570860993803*^9}, {3.747570941533657*^9, 3.747570947293482*^9}, {
   3.747570979528742*^9, 3.747570979833435*^9}, {3.7475710460233097`*^9, 
   3.747571047925109*^9}, {3.747571084476077*^9, 3.747571086328722*^9}, {
   3.747571371903867*^9, 3.7475713729193487`*^9}, {3.747571561267179*^9, 
   3.747571562589777*^9}, {3.747572757880087*^9, 3.747572827753377*^9}, {
   3.747572862364382*^9, 3.747572879792859*^9}, {3.759519240146062*^9, 
   3.759519241328768*^9}, {3.760948481143589*^9, 3.760948499262701*^9}, {
   3.7609488207683067`*^9, 3.760948841778069*^9}, {3.760948882588552*^9, 
   3.760948883842764*^9}, {3.760948940717063*^9, 3.760948975282666*^9}, {
   3.760949011970159*^9, 3.760949012184416*^9}, 3.760949083736237*^9, {
   3.760949130238394*^9, 3.76094916161519*^9}, 3.760985557982565*^9, {
   3.7611975087352133`*^9, 3.76119751660457*^9}, {3.761474171084214*^9, 
   3.761474174768375*^9}, {3.761474414190099*^9, 3.761474436739811*^9}, {
   3.761474489155945*^9, 3.761474515473364*^9}, {3.761474549322021*^9, 
   3.761474603151936*^9}, {3.761474729429777*^9, 3.761474784036825*^9}, {
   3.761474849276947*^9, 3.7614748512846203`*^9}, 3.7614749412429934`*^9, {
   3.761475075055262*^9, 3.761475111589944*^9}, {3.761475177678194*^9, 
   3.761475208235873*^9}, {3.7614754099022007`*^9, 3.761475460275897*^9}, {
   3.7614755580354347`*^9, 3.7614755584485207`*^9}, {3.761475602255143*^9, 
   3.761475618458747*^9}, {3.761475728303033*^9, 3.7614757291959743`*^9}, {
   3.761475895540306*^9, 3.761475953150948*^9}, {3.7614759877525053`*^9, 
   3.7614760216772137`*^9}, {3.761476346852703*^9, 3.761476436475614*^9}, {
   3.761476501004677*^9, 3.7614765014024887`*^9}, {3.76147653684481*^9, 
   3.7614765625145817`*^9}, {3.7614766027780857`*^9, 3.761476696389943*^9}, {
   3.761476781958541*^9, 3.761476847138636*^9}, {3.761476879235957*^9, 
   3.761476898257463*^9}, {3.7614769388987217`*^9, 3.761476939672125*^9}, {
   3.7617280288811703`*^9, 3.7617280290289*^9}, {3.762062000358593*^9, 
   3.762062002890757*^9}, 3.7622515661086082`*^9, {3.762251817102137*^9, 
   3.762251929165433*^9}, {3.762252005452671*^9, 3.762252005611527*^9}, {
   3.762252046930657*^9, 3.7622520653518887`*^9}, {3.7622521337322073`*^9, 
   3.762252160781577*^9}, {3.762252243669989*^9, 3.762252252382333*^9}, {
   3.7622522870584927`*^9, 3.7622523110998173`*^9}, {3.7622525892905617`*^9, 
   3.762252653190784*^9}, {3.762252687617072*^9, 3.76225268868604*^9}, 
   3.762252720098925*^9, {3.7622602134972677`*^9, 3.762260245781844*^9}, {
   3.7622603606728363`*^9, 3.7622603955795927`*^9}, 3.762260809124468*^9, {
   3.762260920835347*^9, 3.7622609336590014`*^9}, {3.7622611020859957`*^9, 
   3.7622611022128*^9}, {3.762265433988163*^9, 3.762265647951427*^9}, {
   3.762265682974736*^9, 3.762265714676045*^9}, {3.7622657998190107`*^9, 
   3.762265823490719*^9}, {3.762266150777772*^9, 3.762266183714326*^9}, {
   3.762266297442079*^9, 3.762266404084507*^9}, {3.762266503346043*^9, 
   3.7622665058192873`*^9}, {3.762266581522806*^9, 3.762266603588318*^9}, {
   3.762266694495263*^9, 3.762266728238165*^9}, {3.762266789430751*^9, 
   3.76226681293922*^9}, {3.7622668497813883`*^9, 3.762266850066354*^9}, {
   3.762267098742383*^9, 3.762267102028309*^9}, {3.762267643315309*^9, 
   3.7622677082670116`*^9}, {3.762267743017583*^9, 3.762267788543005*^9}, {
   3.7622678343978357`*^9, 3.762267872315877*^9}, {3.762267908117887*^9, 
   3.762267928051405*^9}, 3.762267973773315*^9, {3.762268017780451*^9, 
   3.7622680575155687`*^9}, 3.762793093215591*^9, {3.763796995475988*^9, 
   3.7637970043599586`*^9}, {3.7643154838421183`*^9, 3.764315495506998*^9}, {
   3.764945527167924*^9, 3.764945538174453*^9}, {3.767432814398486*^9, 
   3.767432819483389*^9}, {3.7674328754926987`*^9, 3.767432894311245*^9}, {
   3.7674334785881023`*^9, 3.76743347876075*^9}, {3.783069231678774*^9, 
   3.783069266967184*^9}, 3.7830693020753717`*^9, 3.7830876846213007`*^9, {
   3.783601557168208*^9, 3.78360156744668*^9}, {3.7836022865660763`*^9, 
   3.783602306060294*^9}, {3.783602507800161*^9, 3.783602521215067*^9}, {
   3.7836025595507593`*^9, 3.783602559800055*^9}, {3.783604816433077*^9, 
   3.783604819534629*^9}, {3.783749852081997*^9, 3.7837498583161583`*^9}, {
   3.783839612368231*^9, 3.783839619375147*^9}, {3.7838397408860607`*^9, 
   3.783839742547872*^9}, 3.7838399432332*^9, {3.78383997716043*^9, 
   3.783839994134857*^9}, {3.783840038479353*^9, 3.7838400808994637`*^9}, {
   3.783841286096673*^9, 3.783841286359161*^9}, {3.7869680370032673`*^9, 
   3.7869680380252666`*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[638]:=",
 CellID->804228984,ExpressionUUID->"5459d5fd-3a04-4d47-84f2-bab91ffe041a"],

Cell[BoxData[
 RowBox[{
  RowBox[{"ExportCrystalData", "[", 
   RowBox[{"invalidProgram_String", ",", "rest___"}], "]"}], ":=", 
  RowBox[{"(", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"If", "[", 
     RowBox[{
      RowBox[{"!", 
       RowBox[{"MemberQ", "[", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"\"\<DISCUS\>\"", ",", "\"\<DIFFUSE\>\""}], "}"}], ",", 
         "invalidProgram"}], "]"}]}], ",", "\[IndentingNewLine]", 
      RowBox[{"Message", "[", 
       RowBox[{
        RowBox[{"ExportCrystalData", "::", "InvalidProgramOrFormat"}], ",", 
        "invalidProgram"}], "]"}], ",", "\[IndentingNewLine]", 
      RowBox[{"Message", "[", 
       RowBox[{"ExportCrystalData", "::", "ParameterError"}], "]"}]}], "]"}], 
    ";", "\[IndentingNewLine]", 
    RowBox[{"Abort", "[", "]"}]}], "\[IndentingNewLine]", ")"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.682241896337058*^9, 3.6822419009563293`*^9}, {
   3.6822421030731297`*^9, 3.682242104796829*^9}, {3.682242247634622*^9, 
   3.682242293608499*^9}, {3.6822423242774973`*^9, 3.6822424939877663`*^9}, {
   3.682242524871819*^9, 3.682242610095582*^9}, {3.6822426631468697`*^9, 
   3.682242849688897*^9}, {3.682242985123843*^9, 3.682243000592795*^9}, {
   3.682243032221999*^9, 3.682243042906146*^9}, {3.682243121993319*^9, 
   3.682243187533738*^9}, {3.6822433171568623`*^9, 3.682243318068676*^9}, {
   3.6822433533711243`*^9, 3.68224345949043*^9}, {3.682243499999116*^9, 
   3.682243500570818*^9}, {3.682243559642397*^9, 3.682243568303032*^9}, {
   3.682243656585619*^9, 3.682243807041559*^9}, {3.682243892622666*^9, 
   3.682243979341007*^9}, {3.682244011749632*^9, 3.682244092729911*^9}, {
   3.6822441869470167`*^9, 3.682244221175058*^9}, {3.68224427065597*^9, 
   3.682244283409008*^9}, {3.6822443160128517`*^9, 3.682244326447394*^9}, {
   3.682244392020493*^9, 3.682244400571671*^9}, {3.682244596208706*^9, 
   3.682244803339835*^9}, {3.682244951115906*^9, 3.6822449654470167`*^9}, {
   3.682247256239483*^9, 3.682247304444981*^9}, {3.682247343926553*^9, 
   3.682247361035624*^9}, {3.682247395780785*^9, 3.6822474984407682`*^9}, {
   3.6822475305652437`*^9, 3.682247636381772*^9}, {3.6822476807262373`*^9, 
   3.682247690229601*^9}, {3.682247723533629*^9, 3.682247825538166*^9}, {
   3.682247866195016*^9, 3.6822478768890457`*^9}, {3.682247927112714*^9, 
   3.682248080675892*^9}, {3.682248357004342*^9, 3.682248375626561*^9}, {
   3.6822486441315317`*^9, 3.682248669634107*^9}, 3.68224956936229*^9, 
   3.682262332986014*^9, {3.6822623719028997`*^9, 3.68226237223594*^9}, {
   3.682312281830681*^9, 3.6823123030407467`*^9}, {3.682323578349629*^9, 
   3.682323592418137*^9}, {3.6823237158461313`*^9, 3.682323721213748*^9}, 
   3.682327662602072*^9, {3.6824963506791697`*^9, 3.6824963547512217`*^9}, {
   3.682496400113083*^9, 3.682496493228437*^9}, 3.682677149488262*^9, {
   3.685082142306231*^9, 3.6850821530756807`*^9}, 3.685084035768195*^9, {
   3.68655238046353*^9, 3.686552426771611*^9}, {3.6865525950866337`*^9, 
   3.686552685595372*^9}, {3.686635545814003*^9, 3.686635612323032*^9}, {
   3.686645933806924*^9, 3.686646007894505*^9}, {3.686646064248117*^9, 
   3.68664607682882*^9}, {3.686655195368894*^9, 3.6866552343027163`*^9}, {
   3.6866553151103287`*^9, 3.686655409251244*^9}, {3.6866554490764103`*^9, 
   3.686655514039054*^9}, {3.686655580018355*^9, 3.686655635546473*^9}, {
   3.686655748745368*^9, 3.686655776590246*^9}, {3.714925556554666*^9, 
   3.714925578583651*^9}, {3.7149256217212152`*^9, 3.714925689133297*^9}, {
   3.7149258652268667`*^9, 3.714925953487383*^9}, {3.71492600096751*^9, 
   3.714926119019596*^9}, {3.714926175338132*^9, 3.714926196305581*^9}, 
   3.7149262352489967`*^9, {3.714926307824396*^9, 3.7149264095004387`*^9}, {
   3.714926450015284*^9, 3.7149265295624437`*^9}, {3.7149265755610447`*^9, 
   3.714926579417263*^9}, {3.714926655695353*^9, 3.714926765295703*^9}, {
   3.714927064423978*^9, 3.714927159155733*^9}, {3.7149272069557753`*^9, 
   3.7149276407442627`*^9}, {3.714927818589819*^9, 3.714927894002508*^9}, {
   3.715014199691877*^9, 3.7150142148573313`*^9}, {3.715064942408142*^9, 
   3.715064943132308*^9}, {3.7153145414034758`*^9, 3.7153145467616673`*^9}, 
   3.715327856633502*^9, {3.7154051731829433`*^9, 3.7154051929183903`*^9}, {
   3.7154052332773438`*^9, 3.715405253294734*^9}, {3.715405360310897*^9, 
   3.7154054069587708`*^9}, {3.717222403726162*^9, 3.717222415552843*^9}, {
   3.717222474077138*^9, 3.717222480379856*^9}, {3.7172225774835167`*^9, 
   3.717222584585285*^9}, {3.717740920496456*^9, 3.71774092050616*^9}, {
   3.7220727239925957`*^9, 3.722072731381322*^9}, {3.722072809534255*^9, 
   3.722072832036512*^9}, {3.722072863802107*^9, 3.722072898519074*^9}, 
   3.726561391058339*^9, 3.727675293483314*^9, 3.727676783958682*^9, {
   3.728106031257224*^9, 3.7281060589380007`*^9}, {3.728106180011772*^9, 
   3.728106202173979*^9}, {3.728106287634863*^9, 3.728106301113369*^9}, {
   3.7281063321779118`*^9, 3.728106374799776*^9}, {3.7281065875793667`*^9, 
   3.728106596424721*^9}, {3.728106935268379*^9, 3.728106947051586*^9}, {
   3.728107085050242*^9, 3.728107225807564*^9}, {3.7281087296199503`*^9, 
   3.7281087417638607`*^9}, {3.728108952031921*^9, 3.728108953406122*^9}, 
   3.728109068830366*^9, {3.728109140732355*^9, 3.728109162684065*^9}, 
   3.7281092259390078`*^9, 3.737968467010312*^9, {3.7455680832964697`*^9, 
   3.745568119889543*^9}, {3.747569432494769*^9, 3.747569442874075*^9}, {
   3.74756949426586*^9, 3.747569500574552*^9}, {3.7475695377399282`*^9, 
   3.7475695465343924`*^9}, {3.7475699175021257`*^9, 3.747569978808453*^9}, {
   3.747570081604307*^9, 3.7475700987875013`*^9}, {3.747570851329288*^9, 
   3.747570860993803*^9}, {3.747570941533657*^9, 3.747570947293482*^9}, {
   3.747570979528742*^9, 3.747570979833435*^9}, {3.7475710460233097`*^9, 
   3.747571047925109*^9}, {3.747571084476077*^9, 3.747571086328722*^9}, {
   3.747571371903867*^9, 3.7475713729193487`*^9}, {3.747571561267179*^9, 
   3.747571562589777*^9}, {3.747572757880087*^9, 3.747572827753377*^9}, {
   3.747572862364382*^9, 3.747572879792859*^9}, {3.759519240146062*^9, 
   3.759519241328768*^9}, {3.760948481143589*^9, 3.760948499262701*^9}, {
   3.7609488207683067`*^9, 3.760948841778069*^9}, {3.760948882588552*^9, 
   3.760948883842764*^9}, {3.760948940717063*^9, 3.760948975282666*^9}, {
   3.760949011970159*^9, 3.760949012184416*^9}, 3.760949083736237*^9, {
   3.760949130238394*^9, 3.76094916161519*^9}, 3.760985557982565*^9, {
   3.7611975087352133`*^9, 3.76119751660457*^9}, {3.761474171084214*^9, 
   3.761474174768375*^9}, {3.761474414190099*^9, 3.761474436739811*^9}, {
   3.761474489155945*^9, 3.761474515473364*^9}, {3.761474549322021*^9, 
   3.761474603151936*^9}, {3.761474729429777*^9, 3.761474784036825*^9}, {
   3.761474849276947*^9, 3.7614748512846203`*^9}, 3.7614749412429934`*^9, {
   3.761475075055262*^9, 3.761475111589944*^9}, {3.761475177678194*^9, 
   3.761475208235873*^9}, {3.7614754099022007`*^9, 3.761475460275897*^9}, {
   3.7614755580354347`*^9, 3.7614755584485207`*^9}, {3.761475602255143*^9, 
   3.761475618458747*^9}, {3.761475728303033*^9, 3.7614757291959743`*^9}, {
   3.761475895540306*^9, 3.761475953150948*^9}, {3.7614759877525053`*^9, 
   3.7614760216772137`*^9}, {3.761476346852703*^9, 3.761476436475614*^9}, {
   3.761476501004677*^9, 3.7614765014024887`*^9}, {3.76147653684481*^9, 
   3.7614765625145817`*^9}, {3.7614766027780857`*^9, 3.761476696389943*^9}, {
   3.761476781958541*^9, 3.761476847138636*^9}, {3.761476879235957*^9, 
   3.761476898257463*^9}, {3.7614769388987217`*^9, 3.761476939672125*^9}, {
   3.7617280288811703`*^9, 3.7617280290289*^9}, {3.762062000358593*^9, 
   3.762062002890757*^9}, 3.7622515661086082`*^9, {3.762251817102137*^9, 
   3.762251929165433*^9}, {3.762252005452671*^9, 3.762252005611527*^9}, {
   3.762252046930657*^9, 3.7622520653518887`*^9}, {3.7622521337322073`*^9, 
   3.762252160781577*^9}, {3.762252243669989*^9, 3.762252252382333*^9}, {
   3.7622522870584927`*^9, 3.7622523110998173`*^9}, {3.7622525892905617`*^9, 
   3.762252653190784*^9}, {3.762252687617072*^9, 3.76225268868604*^9}, 
   3.762252720098925*^9, {3.7622602134972677`*^9, 3.762260245781844*^9}, {
   3.7622603606728363`*^9, 3.7622603955795927`*^9}, 3.762260809124468*^9, {
   3.762260920835347*^9, 3.7622609336590014`*^9}, {3.7622611020859957`*^9, 
   3.7622611022128*^9}, {3.762265433988163*^9, 3.762265647951427*^9}, {
   3.762265682974736*^9, 3.762265714676045*^9}, {3.7622657998190107`*^9, 
   3.762265823490719*^9}, {3.762266150777772*^9, 3.762266183714326*^9}, {
   3.762266297442079*^9, 3.762266404084507*^9}, {3.762266503346043*^9, 
   3.7622665058192873`*^9}, {3.762266581522806*^9, 3.762266603588318*^9}, {
   3.762266694495263*^9, 3.762266728238165*^9}, {3.762266789430751*^9, 
   3.76226681293922*^9}, {3.7622668497813883`*^9, 3.762266850066354*^9}, {
   3.762267098742383*^9, 3.762267102028309*^9}, {3.762267643315309*^9, 
   3.7622677082670116`*^9}, {3.762267743017583*^9, 3.762267788543005*^9}, {
   3.7622678343978357`*^9, 3.762267872315877*^9}, {3.762267908117887*^9, 
   3.762267928051405*^9}, 3.762267973773315*^9, {3.762268017780451*^9, 
   3.7622680575155687`*^9}, 3.762793093215591*^9, {3.763796995475988*^9, 
   3.7637970043599586`*^9}, {3.7643154838421183`*^9, 3.764315495506998*^9}, {
   3.764945527167924*^9, 3.764945538174453*^9}, {3.767432814398486*^9, 
   3.767432819483389*^9}, {3.7674328754926987`*^9, 3.767432894311245*^9}, {
   3.7674334785881023`*^9, 3.76743347876075*^9}, {3.783069231678774*^9, 
   3.783069266967184*^9}, 3.7830693020753717`*^9, 3.7830876846213007`*^9, {
   3.783601557168208*^9, 3.78360156744668*^9}, {3.7836022865660763`*^9, 
   3.783602306060294*^9}, {3.783602507800161*^9, 3.783602521215067*^9}, {
   3.7836025595507593`*^9, 3.783602559800055*^9}, {3.783604816433077*^9, 
   3.783604819534629*^9}, {3.783749852081997*^9, 3.7837498583161583`*^9}, {
   3.783839612368231*^9, 3.783839619375147*^9}, {3.7838397408860607`*^9, 
   3.783839742547872*^9}, 3.7838399432332*^9, {3.78383997716043*^9, 
   3.783839994134857*^9}, {3.783840038479353*^9, 3.783840055934451*^9}, {
   3.7856866354927807`*^9, 3.785686770095469*^9}, {3.785686913801567*^9, 
   3.7856869257325363`*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[639]:=",
 CellID->414459870,ExpressionUUID->"6c27da73-d22f-4e56-bc4f-04fe943caf56"]
}, Closed]]
}, Open  ]]
},
WindowSize->Medium,
WindowMargins->Automatic,
Visible->True,
CellContext->"Global`",
FrontEndVersion->"11.3 for Mac OS X x86 (32-bit, 64-bit Kernel) (March 5, \
2018)",
StyleDefinitions->FrontEnd`FileName[{"Wolfram"}, "FunctionPageStyles.nb", 
  CharacterEncoding -> "UTF-8"]
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{
 "ExtendedExamples"->{
  Cell[20340, 543, 155, 2, 56, "ExtendedExamplesSection",ExpressionUUID->"f4689d5b-0a23-4b40-b553-ab6eaf453b33",
   CellTags->"ExtendedExamples",
   CellID->1854448968]}
 }
*)
(*CellTagsIndex
CellTagsIndex->{
 {"ExtendedExamples", 106083, 2127}
 }
*)
(*NotebookFileOutline
Notebook[{
Cell[558, 20, 866, 18, 24, "History",ExpressionUUID->"50dc4a4f-4928-4b52-815b-6050e7a85ad7",
 CellID->1247902091],
Cell[CellGroupData[{
Cell[1449, 42, 123, 1, 29, "CategorizationSection",ExpressionUUID->"d176bde3-ab33-447b-b7e2-c82de9e031b1",
 CellID->1122911449],
Cell[1575, 45, 134, 2, 70, "Categorization",ExpressionUUID->"fc678601-a1d7-4f09-ac55-3b0e07f5fd9f",
 CellID->686433507],
Cell[1712, 49, 133, 2, 70, "Categorization",ExpressionUUID->"c1aed691-cdcd-4a68-8cf0-cd8ec05d5ed9",
 CellID->605800465],
Cell[1848, 53, 130, 2, 70, "Categorization",ExpressionUUID->"13ed38d9-6e31-436d-b609-d48f58796d50",
 CellID->468444828],
Cell[1981, 57, 127, 1, 70, "Categorization",ExpressionUUID->"881c0d15-1319-4b52-a8ff-c5a7666ccee9"]
}, Closed]],
Cell[CellGroupData[{
Cell[2145, 63, 110, 1, 19, "KeywordsSection",ExpressionUUID->"edf8455b-660b-4a42-90de-bfd7380bc6df",
 CellID->477174294],
Cell[2258, 66, 100, 1, 70, "Keywords",ExpressionUUID->"c99f7077-7e8b-43e1-8b2c-41480358b580",
 CellID->1164421360]
}, Closed]],
Cell[CellGroupData[{
Cell[2395, 72, 120, 1, 19, "TemplatesSection",ExpressionUUID->"2099d69e-c294-47aa-85b7-4a5ccbb1e12d",
 CellID->1872225408],
Cell[2518, 75, 149, 2, 70, "Template",ExpressionUUID->"35c196d0-9160-4062-88a8-0dc128d8f761",
 CellID->1562036412],
Cell[2670, 79, 137, 2, 70, "Template",ExpressionUUID->"64c476db-8285-4698-84f2-64166a18665c",
 CellID->158391909],
Cell[2810, 83, 136, 2, 70, "Template",ExpressionUUID->"611bf4cf-661b-4049-b506-5e6754d52fcd",
 CellID->1360575930],
Cell[2949, 87, 137, 2, 70, "Template",ExpressionUUID->"dc2f47ff-3a68-4247-a6c6-170874cf8988",
 CellID->793782254]
}, Closed]],
Cell[CellGroupData[{
Cell[3123, 94, 108, 1, 19, "DetailsSection",ExpressionUUID->"66861830-f7ec-447d-90d7-b30eb2ce7395",
 CellID->307771771],
Cell[3234, 97, 118, 2, 70, "Details",ExpressionUUID->"f8dba1c7-482d-42af-9e10-9f2d1db53d33",
 CellID->670882175],
Cell[3355, 101, 124, 2, 70, "Details",ExpressionUUID->"cb48523d-0321-4e5e-bc89-b6878af850e9",
 CellID->350963985],
Cell[3482, 105, 119, 2, 70, "Details",ExpressionUUID->"11be61b0-8a4d-4e00-9878-fd59a7c6f86b",
 CellID->8391405],
Cell[3604, 109, 124, 2, 70, "Details",ExpressionUUID->"5e34a375-c882-4442-bd95-130c3ef93373",
 CellID->3610269],
Cell[3731, 113, 116, 2, 70, "Details",ExpressionUUID->"3833a9b6-ee81-4e0a-a486-8ec3082d6a9b",
 CellID->401364205],
Cell[3850, 117, 116, 2, 70, "Details",ExpressionUUID->"3b2ab7a3-b487-4e15-8978-65b9a4b173e4",
 CellID->350204745],
Cell[3969, 121, 118, 2, 70, "Details",ExpressionUUID->"69a7257a-4a43-4072-a217-b12ba0be971c",
 CellID->732958810],
Cell[4090, 125, 133, 2, 70, "Details",ExpressionUUID->"84f2ea48-9659-48ab-923b-5c56677b3221",
 CellID->222905350],
Cell[4226, 129, 122, 2, 70, "Details",ExpressionUUID->"ba079adf-2f26-4dfb-8c18-88308fd89493",
 CellID->240026365]
}, Closed]],
Cell[CellGroupData[{
Cell[4385, 136, 115, 1, 63, "ObjectName",ExpressionUUID->"0cb23b54-0928-46d7-9fb9-18b309dd83fc",
 CellID->1224892054],
Cell[4503, 139, 2602, 67, 130, "Usage",ExpressionUUID->"60991ac7-0c3e-44a1-b7f2-2a8ed4d32771",
 CellID->982511436],
Cell[7108, 208, 169, 2, 25, "Notes",ExpressionUUID->"995a2847-f6b9-4e5b-90a5-372beb526cb1",
 CellID->2086198239],
Cell[7280, 212, 1025, 24, 59, "3ColumnTableMod",ExpressionUUID->"c80533c0-c5b2-4685-9a41-e3d0940c8ef0",
 CellID->503559283],
Cell[8308, 238, 489, 12, 41, "Notes",ExpressionUUID->"b3a07c44-823a-4f64-b8cb-ffb36b2a582a",
 CellID->1532908556],
Cell[8800, 252, 1662, 30, 115, "3ColumnTableMod",ExpressionUUID->"00b46bb8-060e-47a9-87c0-2fe8805e0122",
 CellID->1937850278],
Cell[10465, 284, 562, 15, 27, "Notes",ExpressionUUID->"c35bd49b-df7b-4abe-b3f9-d5e864779b0e",
 CellID->991443164],
Cell[11030, 301, 496, 11, 27, "Notes",ExpressionUUID->"490398c0-de59-4fd1-ae52-bfa340fe3ffd",
 CellID->12102587]
}, Open  ]],
Cell[CellGroupData[{
Cell[11563, 317, 112, 1, 44, "TutorialsSection",ExpressionUUID->"a783bb20-ee87-42ee-aca9-bff8932ac1ed",
 CellID->250839057],
Cell[11678, 320, 100, 1, 16, "Tutorials",ExpressionUUID->"725995f2-6a8e-4bf1-88d8-ecbc21ac3832",
 CellID->341631938]
}, Open  ]],
Cell[CellGroupData[{
Cell[11815, 326, 138, 1, 31, "RelatedDemonstrationsSection",ExpressionUUID->"098cc794-f85e-4eaa-972b-0dfd43c2b154",
 CellID->1268215905],
Cell[11956, 329, 113, 1, 16, "RelatedDemonstrations",ExpressionUUID->"9c7f86ab-ed20-406d-86ff-6bac47319ec5",
 CellID->1129518860]
}, Open  ]],
Cell[CellGroupData[{
Cell[12106, 335, 120, 1, 31, "RelatedLinksSection",ExpressionUUID->"e7a948f0-7476-47b5-ac29-11eb6a12741b",
 CellID->1584193535],
Cell[12229, 338, 343, 6, 16, "RelatedLinks",ExpressionUUID->"da607a20-a54d-4cc1-bdcc-56b7c78f0ed2",
 CellID->1038487239]
}, Open  ]],
Cell[CellGroupData[{
Cell[12609, 349, 110, 1, 31, "SeeAlsoSection",ExpressionUUID->"1550f926-ac85-45b4-83db-59f233a94990",
 CellID->1255426704],
Cell[12722, 352, 2148, 52, 56, "SeeAlso",ExpressionUUID->"3b0b554a-78bc-42da-a960-dba808805343",
 CellID->929782353]
}, Open  ]],
Cell[CellGroupData[{
Cell[14907, 409, 112, 1, 31, "MoreAboutSection",ExpressionUUID->"feba3026-9a11-4ab6-8524-06d15e2564b1",
 CellID->38303248],
Cell[15022, 412, 101, 1, 16, "MoreAbout",ExpressionUUID->"9a200e81-69e3-4a62-bf89-b6024e667510",
 CellID->1665078683]
}, Open  ]],
Cell[CellGroupData[{
Cell[15160, 418, 411, 11, 70, "PrimaryExamplesSection",ExpressionUUID->"2a5f58bb-3541-446a-9ce9-5ee26b6a05f8",
 CellID->880084151],
Cell[CellGroupData[{
Cell[15596, 433, 822, 19, 71, "Input",ExpressionUUID->"c2d86ab0-8bf6-40dc-94a2-ef0a972c0266",
 CellID->264836864],
Cell[16421, 454, 773, 13, 178, "Output",ExpressionUUID->"9da4655d-6c05-419b-8975-5ab973a4f0d4",
 CellID->254198486]
}, Open  ]],
Cell[CellGroupData[{
Cell[17231, 472, 242, 5, 17, "ExampleDelimiter",ExpressionUUID->"533b0f72-61df-415b-9ef3-1b6f4575fb29",
 CellID->464228894],
Cell[CellGroupData[{
Cell[17498, 481, 397, 8, 27, "Input",ExpressionUUID->"a19dcebc-1c52-426f-b729-c79184391b8a",
 CellID->1951865879],
Cell[17898, 491, 353, 7, 49, "Output",ExpressionUUID->"2fedf34c-5df2-4d00-bd28-f3b050f67c7e",
 CellID->5454424]
}, Open  ]],
Cell[CellGroupData[{
Cell[18288, 503, 305, 7, 29, "Input",ExpressionUUID->"9ea991c1-89d5-461c-8897-55ef42004010",
 CellID->921750799],
Cell[18596, 512, 1683, 24, 327, "Output",ExpressionUUID->"dd075130-54a4-4b1f-a57d-9615990c5e25",
 CellID->1726379975]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[20340, 543, 155, 2, 56, "ExtendedExamplesSection",ExpressionUUID->"f4689d5b-0a23-4b40-b553-ab6eaf453b33",
 CellTags->"ExtendedExamples",
 CellID->1854448968],
Cell[20498, 547, 242, 5, 33, "ExampleSection",ExpressionUUID->"ff40a874-2b2d-4363-98e8-3415ba2bb5fd",
 CellID->1293636265],
Cell[20743, 554, 265, 5, 21, "ExampleSection",ExpressionUUID->"62a0c476-a513-4e9f-95f7-55256596555b",
 CellID->1020263627],
Cell[CellGroupData[{
Cell[21033, 563, 244, 5, 21, "ExampleSection",ExpressionUUID->"61bacb70-5179-4559-bab9-976f41e8c39b",
 CellID->2061341341],
Cell[CellGroupData[{
Cell[21302, 572, 370, 7, 24, "ExampleSubsection",ExpressionUUID->"8b24286f-2423-42cf-bdb3-7ec5f6fe9882",
 CellID->1757724783],
Cell[CellGroupData[{
Cell[21697, 583, 777, 18, 71, "Input",ExpressionUUID->"0806bceb-770d-4865-9e75-aa559208be28",
 CellID->409295607],
Cell[22477, 603, 1142, 18, 202, "Output",ExpressionUUID->"d1b4d32e-4b8a-4630-bc8e-936ff22f3a1e",
 CellID->1418182021]
}, Open  ]]
}, Open  ]],
Cell[23646, 625, 247, 5, 24, "ExampleSubsection",ExpressionUUID->"c66ad56d-2b62-4d04-aea6-fbe9a9165027",
 CellID->1295379749]
}, Open  ]],
Cell[23908, 633, 248, 5, 33, "ExampleSection",ExpressionUUID->"4b911d45-e5cc-4b06-9938-b0b81479e787",
 CellID->258228157],
Cell[24159, 640, 259, 5, 21, "ExampleSection",ExpressionUUID->"9e9b535c-8724-47d9-8591-086dc4ed09a1",
 CellID->2123667759],
Cell[24421, 647, 252, 5, 21, "ExampleSection",ExpressionUUID->"b35ac030-5d47-48e8-9407-c8250af69641",
 CellID->1305812373],
Cell[24676, 654, 257, 5, 21, "ExampleSection",ExpressionUUID->"2c01ec3f-c12e-4a12-bcb7-5b6f12e749b1",
 CellID->1653164318],
Cell[24936, 661, 249, 5, 21, "ExampleSection",ExpressionUUID->"e5ef6032-f977-4f96-b142-1a31fafbc1bd",
 CellID->589267740],
Cell[CellGroupData[{
Cell[25210, 670, 374, 8, 21, "ExampleSection",ExpressionUUID->"efc4cf49-9f02-4a51-8842-ae6eafeba104",
 CellID->422887447],
Cell[25587, 680, 2320, 55, 321, "Input",ExpressionUUID->"c6d97d09-e292-45d1-9c8c-4231ede77fa4",
 InitializationCell->False,
 CellID->1270824473],
Cell[27910, 737, 22013, 418, 1688, "Input",ExpressionUUID->"dc94ec92-e1c1-4468-9d3e-8d7ecd224421",
 InitializationCell->False,
 CellID->2022048296],
Cell[49926, 1157, 33615, 611, 2585, "Input",ExpressionUUID->"1bb5ba4c-a1a6-4fb5-b768-57a59cf75fec",
 InitializationCell->False,
 CellID->636997097],
Cell[83544, 1770, 11713, 185, 289, "Input",ExpressionUUID->"5459d5fd-3a04-4d47-84f2-bab91ffe041a",
 InitializationCell->False,
 CellID->804228984],
Cell[95260, 1957, 10397, 152, 169, "Input",ExpressionUUID->"6c27da73-d22f-4e56-bc4f-04fe943caf56",
 InitializationCell->False,
 CellID->414459870]
}, Closed]]
}, Open  ]]
}
]
*)

